Open arashsoltani opened 3 years ago
Change the code to this:
if($user = Sentinel::authenticate($request->only('email', 'password'))) {
return redirect('/');
} else {
return redirect()->back();
}
thanks for your help
@arashsoltani Is the status of this issue still correct?
hi.. i have an issue in creating Login with Sentinel. this code, works perfectly as the user has registered in the system. But, when it cant find the user, i get this error:
Argument 1 passed to Cartalyst\Sentinel\Sentinel::login() must implement interface Cartalyst\Sentinel\Users\UserInterface, bool given, called in C:\xampp\htdocs\portal\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 261
here is the code:
$user = Sentinel::authenticate($request->all()); if (Sentinel::check($user)){ Sentinel::login($user); return redirect('/'); } else{ return redirect()->back(); }
how should i fix this? thanks