if (! function_exists('home_route')) {
/**
* Return the route to the "home" page depending on authentication/authorization status.
*
* @return string
*/
function home_route()
{
if (auth()->check()) {
if (auth()->user()->can('view backend')) {
return 'admin.dashboard';
}
return 'frontend.user.dashboard';
}
return 'frontend.index';
}
}
Created
November 8, 2019 23:19
-
-
Save m5lil/28a27bda5fd0ce5e5eb339945e2f7374 to your computer and use it in GitHub Desktop.
Helper File #laravel #helper
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment