lundi 30 décembre 2019

Laravel redirect to home after login [closed]

I have a problem here, I made a multi-level login, there are 3 levels here admin, Santri, Management when the admin and Management log in they redirect to where they should be but why when santri login redirect to home

  protected function authenticated(Request $request, $user)
{

    if ($user->level == 'admin') {
        return redirect('/admin');
    } 
    if ($user->level == 'santri') {
        return redirect('/santri');
    } 
    if ($user->level == 'pengurus') {
        return redirect('/pengurus');
    } 
}


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire