Current File : /home/tradevaly/www/app/Models/MessageList.php |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use App\Models\User;
class MessageList extends Model
{
use HasFactory;
protected $fillable = ['person_one','person_two'];
public function personOne(){
return $this->belongsTo(User::class,'person_one', 'id');
}
public function personTwo(){
return $this->belongsTo(User::class,'person_two', 'id');
}
}