���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
portal-cutunix
/
app
/
Models
/
Viewing: Conversation.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\MorphTo; class Conversation extends Model { protected $fillable = [ 'title', 'creator_id', 'creator_type', 'subject_id', 'subject_type', ]; protected $casts = [ 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; public function creator(): MorphTo { return $this->morphTo(); } public function subject(): MorphTo { return $this->morphTo(); } public function participants(): HasMany { return $this->hasMany(Participant::class); } public function messages(): HasMany { return $this->hasMany(Message::class); } public function lastMessage() { return $this->hasOne(Message::class)->latest(); } public function IamMemberForThis() { $auth_id = null; $auth_model = null; if (auth('tenant')->check()) { $auth_id = auth('tenant')->id(); $auth_model = auth('tenant')->user()::class; } if (auth('web')->check()) { $auth_id = auth('web')->id(); $auth_model = auth('web')->user()::class; } return $this->participants() ->where('participant_type', $auth_model) ->where('participant_id', $auth_id) ->exists(); } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa