classes/Middleware/Guest.php
public function getHome()
    {
        // Vars
        $config = config('decoy.site.post_login_redirect');
        $auth = app('decoy.user');

        // Make the config optional
        if ($config) {

            // Support the config being a colsure
            if (is_callable($config)) {
                $config = call_user_func($config);
            }

            // Make sure the user has permission before redirecting
            if ($auth->can('read', $config)) {
                return $config;
            }
        }

        // If the user doesn't have permission, iterate through the navigation
        // options until one is permissible
        foreach ($this->getNavUrls() as $url) {
            if ($auth->can('read', $url)) {
                return $url;
            }
        }

        // Default to their account page, which all can access
        return $auth->getUserUrl();
    }
public function getHome()
    {
        // Vars
        $config = config('decoy.site.post_login_redirect');
        $auth = app('decoy.user');

        // Make the config optional
        if ($config) {

            // Support the config being a colsure
            if (is_callable($config)) {
                $config = call_user_func($config);
            }

            // Make sure the user has permission before redirecting
            if ($auth->can('read', $config)) {
                return $config;
            }
        }

        // If the user doesn't have permission, iterate through the navigation
        // options until one is permissible
        foreach ($this->getNavUrls() as $url) {
            if ($auth->can('read', $url)) {
                return $url;
            }
        }

        // Default to their account page, which all can access
        return $auth->getUserUrl();
    }
public function getHome ( ) { // Vars $ config = config ( 'decoy.site.post_login_redirect' ) ; $ auth = app ( 'decoy.user' ) ; // Make the config optional if ( $ config ) { // Support the config being a colsure if ( is_callable ( $ config ) ) { $ config = call_user_func ( $ config ) ; } // Make sure the user has permission before redirecting if ( $ auth -> can ( 'read' , $ config ) ) { return $ config ; } } // If the user doesn't have permission, iterate through the navigation // options until one is permissible foreach ( $ this -> getNavUrls ( ) as $ url ) { if ( $ auth -> can ( 'read' , $ url ) ) { return $ url ; } } // Default to their account page, which all can access return $ auth -> getUserUrl ( ) ; }
Determine what the dashboard URL should be, where the user is redirected
after login.

@return string
Determine what the dashboard URL should be where the user is redirected after login .