Answer the question
In order to leave comments, you need to log in
Why is the loginUsingId function not working in Laravel?
Hello! In Laravel, the function in this code does not work:
if(Auth::loginUsingId(3, true)){
$cookie = cookie('cookie', 'mid=' . $user[0]['original']['id'] .'&hash=' . $request, 10080, '/');
return Redirect::back()->cookie($cookie);
}
BadMethodCallException in Builder.php line 2443: Call to undefined method Illuminate\Database\Query\Builder::getAuthIdentifierName()
Answer the question
In order to leave comments, you need to log in
It looks like the user class does not implement the contract \Illuminate\Contracts\Auth\Authenticatable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question