<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Message extends Model
{
    use HasFactory;

    public function to_user()
    {
        return $this->belongsTo('App\Models\User', 'to');
    }
    public function from_user()
    {
        return $this->belongsTo('App\Models\User', 'from');
    }
}
