mardi 17 novembre 2020

Laravel 5.5 Flash Message not working in blade file after redirect

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


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3nB9hh0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire