I'm using Laravel 5.3 and Auth by default with this roles package. How can i do the normal user redirection if i have similar roles and also pages for them. For example i have AdminRole and after the Login i want to redirect user to /admin/dashboard
.
I tried something like this but it doesn't make sense:
protected function redirectTo()
{
if (Auth::user()->isRole('admin'))
return redirect()->route('admin');
return redirect()->route('home');
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2iDaTtB
via IFTTT
Aucun commentaire:
Enregistrer un commentaire