AjayMalhotra Posted on May 29, 2020 Laravel - redirect user based on usertype #laravel #laravel7 https://therichpost.com/laravel-7-how-to-redirect-authenticated-users-based-on-user-type/ Thank you Top comments (1) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand Auniik Datta Auniik Datta Auniik Datta Follow I am a random stranger Location Dhaka, Bangladesh Education Southeast University Work Software Engineer at Portonics Limited Joined Jan 11, 2020 • May 29 '20 Dropdown menu Copy link Hide protected function authenticated(Request $request) { return redirect( [ 'admin' => '/admin/dashboard/', 'superadmin' => '/superadmin/dashboard/' ][ auth()->user()->userType ] ); } How's that ? Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
How's that ?