I want to logout if user is_active == 0 on login function My Code
LoginController.php
protected function authenticated(Request $request, $user)
{
if($user->is_active == 0){
Auth::logout();
return redirect('/')->with(['errorMessage' => 'Your account is temporary blocked']);
}
}
View Code:
@if(session('errorMessage'))
<span class="alert alert-danger">
</span>
@endif
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire