I have a scope method "scopeUserResponse" in user model:
public function scopeUserResponse($query,$user_id)
{
return $query->where('users.id' , $user_id)->select(
'users.id as user_id',
'users.username as user_name',
'users.first_name as user_fname',
'users.last_name as user_lname'
);
}
I am calling it from controller, like:
$userdetail = User::userResponse($user->id)->first();
it was working fine but now its giving me error
Method Illuminate\Database\Query\Builder::userResponse does not exist.
Even my relationship methods are not working after installing Socialite.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire