Laravel 7 - User login and management system with roles - EP16 Redirect users based on roles

preview_player
Показать описание
...
Рекомендации по теме
Комментарии
Автор

If anyone wondering how to use Gate for redirecting, here's what I did.
Add ADMIN route in the like this -
public const ADMIN='/admin/users/';
Then edit the redirectTo() function in the login controller like this -


public function redirectTo(){


if(Gate::allows('manage-users', $current_user)){
return RouteServiceProvider::ADMIN;
}
return RouteServiceProvider::HOME;


}


That's it. Thank you for the tutorial PD ^^

studio-v-digital-treasures
Автор

You're the best Laravel mentor I have found. You explain all the functions by going into the roots. Please keep doing this it helps amateur developers like me a lot!

sifahim
Автор

Thank you very much for this series. very informative. and helpful.

IriesBorbon
Автор

Thanks so much for your work on this series.
It might just save me from getting fired / quitting next month LOL

gigajoules
Автор

thanks so much, I'm learning Laravl from your tutorials, it's easy to learn, Hey you have a few fans in Uzbekistan ))))

azamatkhan
Автор

I just finished your tutorials for this and you have helped me a lot!, thank you very much for your videos and i hope to see more of your tutorials in the future.
Have a good one.

donctavio
Автор

I've just finished this section and thank you so much sir. This is a superb simplicity Amazing!!! :)

jlbardinas
Автор

You are an amazing tutor. Very easy to understand.

fayazvalli
Автор

Thanks so much, I'm learning Laravel from your tutorials, it's easy to learn, Hey you have a few fans in Mauritania ;p

msghalass
Автор

Thank you man, very good tutorial. Can't wait to see next serie ;) Thanks from Italy

joyreef-aquariumblog
Автор

Thank you for the tutorial. I really appreciate it!

erenong
Автор

nice teaching .. vary nice .. thank-Q very much.

farazsalehi
Автор

i've follow this tutorial from ep1, thank alot Penguin Digital

fandiilham
Автор

Thank you!! This series was amazing. Very helpful.

TheWheelTurns
Автор

Thanks! Easy to follow, nice and fast, works like a charm!

MrBrownNL
Автор

Thanks for this awesome series. learned so much and definetly have to rewatch certain episodes. Maybe i get to manage to write some own features now, like support tickets, or get some messages if new users have registered (because i need to put them into the right classroom). curious what comes next :)

kratom
Автор

Thanks you very much, i'm from Canada.

alexandrecarignan
Автор

thanks a lot for this series, a very good job.

YannickMendez
Автор

thank you, we made it
some feedback : please show the database table whenever you create or seeding the table

thanks for your greate work

eyotajr
Автор

wooow man i love this series nd i love your chanell :D
Btw are u using manjaro ???

yassineelghizi