Replies: 1 comment 3 replies
-
Try with a $user = auth()->user();
switch(true){
case $user->hasRole('admin'):
// redirect admin
case $user->hasRole('sales'):
// redirect sales
case $user->hasRole('marketing'):
// redirect marketing
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Assuming that I have 3 roles assigned to the same user.
admin
dashboard = admin
sales
dashboard = sales
marketing
dashboard = marketing
how can I switch between these three roles to get redirected to the preferred dashboard?
Beta Was this translation helpful? Give feedback.
All reactions