samedi 26 septembre 2020

Laravel Redirect to home page

I am using Language switch to switch between English and Arabic.It is working fine in all the links except Home page.

1)If I have not authenticated it is working fine it is redirecting to http://domain.name/en/login

2)If I have auntenticated or logged in and try to access the url http://domain.name/ it is redirecting to http://domain.name/home instead of a http://domain.name/en/home

I have changed in all the Auth files by adding a function

public function redirectTo(){
    return app()->getLocale().'/home';
}


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire