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'); - } + } }