public function dashboard()
    {
        //if the dev has chosen to use a dashboard
        if (config('administrator.use_dashboard')) {
            //set the layout dashboard
            $this->layout->dashboard = true;

            //set the layout content
            $this->layout->content = view(config('administrator.dashboard_view'));

            return $this->layout;
        }
        //else we should redirect to the menu item
        else {
            $configFactory = app('admin_config_factory');
            $home          = config('administrator.home_page');

            //first try to find it if it's a model config item
            $config = $configFactory->make($home);

            if (!$config) {
                throw new \InvalidArgumentException('Administrator: '.trans('administrator::administrator.valid_home_page'));
            } elseif ($config->getType() === 'model') {
                return redirect()->route('admin_index', array($config->getOption('name')));
            } elseif ($config->getType() === 'settings') {
                return redirect()->route('admin_settings', array($config->getOption('name')));
            }
        }
    }
public function dashboard()
    {
        //if the dev has chosen to use a dashboard
        if (config('administrator.use_dashboard')) {
            //set the layout dashboard
            $this->layout->dashboard = true;

            //set the layout content
            $this->layout->content = view(config('administrator.dashboard_view'));

            return $this->layout;
        }
        //else we should redirect to the menu item
        else {
            $configFactory = app('admin_config_factory');
            $home          = config('administrator.home_page');

            //first try to find it if it's a model config item
            $config = $configFactory->make($home);

            if (!$config) {
                throw new \InvalidArgumentException('Administrator: '.trans('administrator::administrator.valid_home_page'));
            } elseif ($config->getType() === 'model') {
                return redirect()->route('admin_index', array($config->getOption('name')));
            } elseif ($config->getType() === 'settings') {
                return redirect()->route('admin_settings', array($config->getOption('name')));
            }
        }
    }
public function dashboard ( ) { //if the dev has chosen to use a dashboard if ( config ( 'administrator.use_dashboard' ) ) { //set the layout dashboard $ this -> layout -> dashboard = true ; //set the layout content $ this -> layout -> content = view ( config ( 'administrator.dashboard_view' ) ) ; return $ this -> layout ; } //else we should redirect to the menu item else { $ configFactory = app ( 'admin_config_factory' ) ; $ home = config ( 'administrator.home_page' ) ; //first try to find it if it's a model config item $ config = $ configFactory -> make ( $ home ) ; if ( ! $ config ) { throw new \ InvalidArgumentException ( 'Administrator: ' . trans ( 'administrator::administrator.valid_home_page' ) ) ; } elseif ( $ config -> getType ( ) === 'model' ) { return redirect ( ) -> route ( 'admin_index' , array ( $ config -> getOption ( 'name' ) ) ) ; } elseif ( $ config -> getType ( ) === 'settings' ) { return redirect ( ) -> route ( 'admin_settings' , array ( $ config -> getOption ( 'name' ) ) ) ; } } }
Shows the dashboard page.

@return Response
Shows the dashboard page .