Skip to content

Commit

Permalink
set homeRoute to frontend.index
Browse files Browse the repository at this point in the history
when user logins to the app user redirects to frontend.index instead of redirecting to dashboard or intranet by checking the user type
  • Loading branch information
IsharaEkanayaka committed Jul 15, 2024
1 parent a02676a commit a1fc0b8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/Helpers/Global/GeneralHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ function carbon($time)
*/
function homeRoute()
{
if (auth()->check()) {
if (auth()->user()->isAdmin()) {
return 'dashboard.home';
}
// if (auth()->check()) {
// if (auth()->user()->isAdmin()) {
// return 'dashboard.home';
// }

if (auth()->user()->isUser()) {
return 'intranet.user.index';
}
}
// if (auth()->user()->isUser()) {
// return 'intranet.user.index';
// }
// }

return 'frontend.index';
}
Expand Down

0 comments on commit a1fc0b8

Please sign in to comment.