Current File : //home/tradevaly/text.tradevaly.com.bd/app/Models/Thread.php
<?php

namespace App\Models;

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