where('user_id', Auth::user()->id); } function user() { return $this->hasOne(User::class, 'id', 'user_id'); } }