From 34d7e0a6d61619bd8d5fc535a9f890c6bb9d00bd Mon Sep 17 00:00:00 2001 From: Fayyazi Date: Mon, 22 Jul 2019 13:19:20 +0430 Subject: [PATCH] change message --- app/Message.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/Message.php b/app/Message.php index 7ff20a86..21bb37a8 100644 --- a/app/Message.php +++ b/app/Message.php @@ -2,16 +2,18 @@ namespace App; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; class Message extends Model { - public $fillable = ['title', 'text', 'status', 'recipient_user_id', 'sender_user_id']; - public function sender_user() - { + use SoftDeletes; + public $fillable = ['title', 'text', 'status', 'recipient_user_id', 'sender_user_id']; + public function sender_user() + { return $this->belongsTo('App\User', 'sender_user_id'); - } - public function recipient_user() - { + } + public function recipient_user() + { return $this->belongsTo('App\User', 'recipient_user_id'); - } + } }