For More Project Base Course Check - www.easylearningbd.com/p/courses 🎉
@k.a.rayhan701711 ай бұрын
you are a hidden gem sir...
@azPrime Жыл бұрын
thank you very much , well explained 6:59 using agent.dashboard and admin.dashboard is more recommanded than using admin/dashboard and agent/dashboard because it helps the code to be more maintainable
@asifali-fc8xt Жыл бұрын
best lecture presentation
@buddhikachathurangaariyasi7994 Жыл бұрын
very helpful tutorials. thanks
@vismodeb Жыл бұрын
very much for your content.
@basel495 Жыл бұрын
Thank you so much for this course🎉
@jakke1975 Жыл бұрын
instead of the whole if elseif structure, isn't it easier to simply state $url=$request->user()->role."/dashboard"? I mean, obviously you need a UserController and everything too, but it only seems fair I think...
@azPrime Жыл бұрын
this doesnt work when you have over 2 options , in our case we have 3
@raviel4987 ай бұрын
Using switch statement is much cleaner in my opinion. Switch is underrated.
@nuridahsapee-e410510 ай бұрын
anyone who face some error because of $url variable. Here the code that work for me: if (Auth::user() && Auth::user()->role == 'admin') { return redirect()->intended('admin/dashboard'); } elseif (Auth::user() && Auth::user()->role == 'agent') { return redirect()->intended('agent/dashboard'); } elseif (Auth::user()) { return redirect()->intended(RouteServiceProvider::HOME); } You're welcome :)