vendredi 17 janvier 2020

I have two condition of login redirect in laravel either same page or dashboard | Laravel

How can i redirect after login. There are two condition of login redirection either it should be return on dashboard if user goto direct login page or redirect same ( like cart or somthing)

In LoginController

 public function redirectTo(){
if (request()->has('previous')) {
    $this->redirectTo = request()->get('previous');
 }
 return $this->redirectTo ?? '/dashboard';

}

but how can i set url previous



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire