Response to show dashboard.

@return mixed
322912
public function showDashboard()
    {
        set_meta('title', trans('antares/foundation::title.home'));
        $this->app->make('events')->fire('version.check');
        $this->app->make('events')->fire(new VersionCheck());
        if (!auth()->guest() && auth()->user()->hasRoles('member')) {
            return view('antares/foundation::dashboard.member');
        }

        return view('antares/foundation::dashboard.index');
    }
840075
public function indexAction()
	{
		foreach( app( 'config' )->get( 'shop.page.account-index' ) as $name )
		{
			$params['aiheader'][$name] = Shop::get( $name )->getHeader();
			$params['aibody'][$name] = Shop::get( $name )->getBody();
		}

		return Response::view('shop::account.index', $params);
	}
158756
protected function _get()
    {
        $pageTitle = $this->getConfig('scaffold.page_title', __d('CrudView', 'Dashboard'));
        $this->setConfig('scaffold.page_title', $pageTitle);
        $this->setConfig('scaffold.autoFields', false);
        $this->setConfig('scaffold.fields', ['dashboard']);
        $this->setConfig('scaffold.actions', []);

        $dashboard = $this->getConfig('scaffold.dashboard', new Dashboard($pageTitle));
        $subject = $this->_subject([
            'success' => true,
            'dashboard' => $dashboard,
        ]);

        $this->_trigger('beforeRender', $subject);

        $controller = $this->_controller();
        $controller->set('dashboard', $subject->dashboard);
        $controller->set('viewVar', 'dashboard');
        $controller->set('title', $subject->dashboard->get('title'));
    }
1059701
public function showSecurityView()
    {
        $this->subMenu['security']['active'] = true;

        $unsecureUsers = User::whereNull('google_2fa_secret')->orWhere('google_2fa_secret', '=', '')->get();

        Session::flash('redirect_to', $this->subMenu['security']['url']);

        return View::make('dashboard.settings.security')
            ->withPageTitle(trans('dashboard.settings.security.security').' - '.trans('dashboard.dashboard'))
            ->withSubMenu($this->subMenu)
            ->withUnsecureUsers($unsecureUsers);
    }
1091933
public function indexAction()
    {
        $footerContentId = $this->container->getParameter('ezdemo.footer.content_id');
        $footerContent = $this->getRepository()->getContentService()->loadContent($footerContentId);

        $response = new Response();
        $response->setPublic();
        $response->setSharedMaxAge(86400);
        $response->headers->set('X-Location-Id', $footerContent->contentInfo->mainLocationId);
        $response->setVary('X-User-Hash');

        return $this->render(
            'eZDemoBundle::page_footer.html.twig',
            array('content' => $footerContent),
            $response
        );
    }
1156248
public function indexUrl()
    {
        $route = 'admin::edit-page';
        if (Route::has($route)) {
            return route($route, $this->page_id);
        }

        return route('dashboard');
    }
1096413
public function getResponse()
	{
		if (method_exists($this->controller, 'getResponse'))
		{
			/** @var HttpResponse $response */
			$response = $this->controller->getResponse();
		}
		else
		{
			$response = new HttpResponse;
		}

		$fp = fopen('php://output', 'w');
		ob_start();
		fputcsv($fp, $this->header, $this->delimiter, $this->enclosure);
		foreach ($this->content as $i => $item)
		{
			try
			{
				$fields = $this->callback ? call_user_func($this->callback, $item) : $item;
				if (!is_array($fields))
				{
					throw new \RuntimeException('CsvExport can only accept arrays, '. gettype($fields) .' provided at index '. $i .'. Either use arrays when setting the records or use a callback to convert each record into an array.');
				}
				fputcsv($fp, $fields, $this->delimiter, $this->enclosure);
			}
			catch (\Exception $ex)
			{
				ob_end_clean();
				throw $ex;
			}
		}
		fclose($fp);
		$response->setContent(ob_get_clean());

		$response->getHeaders()->addHeaders(array(
			'Content-Type' => 'text/csv',
			'Content-Disposition' => 'attachment;filename="'. str_replace('"', '\\"', $this->name) .'.csv"',
		));

		return $response;
	}
1324389
public function viewAction()
    {
        $id = $this->params()->fromQuery('id');
        $channel = $this->params()->fromRoute('channel', 'default');
        $response = $this->getResponse();
        /* @var \Jobs\Entity\Job $job */
        try {
            $job = $this->initializeJob()->get($this->params(), true);
        } catch (NotFoundException $e) {
            $response->setStatusCode(Response::STATUS_CODE_404);
            return [
                'message' => sprintf($this->translator->translate('Job with id "%s" not found'), $id)
            ];
        }
        
        $mvcEvent             = $this->getEvent();
        $applicationViewModel = $mvcEvent->getViewModel();

        /* @var \Auth\Entity\User $user */
        $user = $this->auth()->getUser();

        /* @var \Zend\View\Model\ViewModel $model */
        $model = $this->viewModelTemplateFilter->getModel($job);

        if (
            Status::ACTIVE == $job->getStatus() or
            Status::WAITING_FOR_APPROVAL == $job->getStatus() or
            $job->getPermissions()->isGranted($user, PermissionsInterface::PERMISSION_VIEW) or
            $this->auth()->isAdmin()
        ) {
            $applicationViewModel->setTemplate('iframe/iFrameInjection');
        } elseif (Status::EXPIRED == $job->getStatus() or  Status::INACTIVE == $job->getStatus()) {
            $response->setStatusCode(Response::STATUS_CODE_410);
            $model->setTemplate('jobs/error/expired');
            $model->setVariables(
                [
                    'job'=>$job,
                    'message', 'the job posting you were trying to open, was inactivated or has expired'
                ]
            );
        } else {
            // there is a special handling for 404 in ZF2
            $response->setStatusCode(Response::STATUS_CODE_404);
            $model->setVariable('message', 'job is not available');
        }
        return $model;
    }
249841
public function httpResponse()
    {
        // get the template
        $template = $this->view()->getTemplate();

        // if there is no template, then we return false
        if(empty($template)) {
            return false;
        }

        // get view data
        $viewData = $this->view()->getAssignedData();

        // assign application data to view
        $viewData['App'] = [
            'Config'       => $this->getEnvironmentConfig(),
            'Components'   => $this->environment->getComponentConfigs()->toArray(),
            'Environment'  => $this->getEnvironmentName(),
            'AbsolutePath' => $this->getAbsolutePath(),
            'WebPath'      => $this->getWebPath()
        ];

        // render the view and assign it to the response object
        return new Response($this->getTemplateEngineInstance()->fetch($this->view()->getTemplate(), $viewData));
    }
274071
public function handler(): Response
    {
        $response = [];
        foreach (Role::all(['createdAt' => 'ASC']) as $role) {
            $response[] = [
                'id' => $role->getId(),
                'name' => $role->getName(),
                'slug' => $role->getSlug(),
                'color' => $role->getColor(),
                'icon' => $role->getIcon()
            ];
        }
        return response($response);
    }
270451
private function fetchResponse()
    {
        $type = $this->settings['type'];

        if (strpos('|INSERT|UPDATE|DELETE|REPLACE|', $type)) {
            if ($this->settings['result'] === 'id') {
                return $this->lastInsertId;
            }

            return $this->rowCount;
        } elseif ($type === 'SELECT') {
            if ($this->settings['result'] !== 'rows') {
                return $this->provider->fetchResponse(
                    $this->response,
                    $this->settings['result']
                );
            }
            if (is_object($this->response)) {
                return $this->provider->rowCount($this->response);
            }
        }

        return true;
    }
870945
public function scriptsAction()
    {
        $scriptsBuilder = $this->get('phlexible_gui.asset.scripts_builder');
        $asset = $scriptsBuilder->build();

        $response = new BinaryFileResponse($asset, 200, array('Content-Type' => 'text/javascript;charset=UTF-8'));
        if ($asset->getMapAsset()) {
            $response->headers->set('X-SourceMap', $this->generateUrl('asset_scripts_map'));
        }

        return $response;
    }
921933
public function indexAction()
    {
        $orders = $this->get('doctrine')
            ->getRepository('HarvestCloudCoreBundle:Order')
            ->findAll()
        ;

        return $this->render(
            'HarvestCloudCoreBundle:Order/Dashboard:index.html.twig',
            array(
                'orders' => $orders,
                'order'  => $orders[0],
            )
        );
    }
602794
protected function response()
	{
		if (!isset($this->response)) {
			$this->response = Response::make();
		}
		
		return $this->response;
	}
734163
public function showIndex()
    {
        $schedule = Schedule::orderBy('created_at')->get();

        return View::make('dashboard.maintenance.index')
            ->withPageTitle(trans('dashboard.schedule.schedule').' - '.trans('dashboard.dashboard'))
            ->withSchedule($schedule);
    }
226814
public function render()
    {
        $period = $this->period();

        $dailyStats = $this->dependencyInstalled() && config('analytics.view_id')
            ? Analytics::fetchTotalVisitorsAndPageViews($period)
            : $dailyStats = $this->fakeData($period);

        $visitors = $dailyStats->sum('visitors');
        $pageViews = $dailyStats->sum('pageViews');
        $maxVisitors = $dailyStats->max('visitors');

        $labels = $this->dateLabels($dailyStats);

        return view(app('scaffold.template')->dashboard('google_analytics'))->with(compact(
            'dailyStats',
            'labels',
            'visitors',
            'pageViews',
            'maxVisitors',
            'period'
        ));
    }
911094
public function run()
    {
        if ($this->layout !== null) {
            $this->controller->layout = $this->layout;
        }

        $this->app->getResponse()->setStatusCodeByException($this->getException());

        if ($this->app->getRequest()->getIsAjax()) {
            return $this->renderAjaxResponse();
        }

        return $this->renderHtmlResponse();
    }