Current File : /home/tradevaly/new.tradevaly.com.bd/app/Models/Message.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Message extends Model
{
    use HasFactory;
    public function sender(){
        return $this->belongsTo(User::class);
    }
    
    public function thread(){
        return $this->belongsTo(Thread::class);
    }
    
    public function receiver(){
        return $this->belongsTo(User::class);
    }
   
}