From d2d3a3e97fb2f4ac2ab979b6659fe382a3f07e4e Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Mon, 13 Nov 2023 15:23:49 +0100 Subject: [PATCH] Simplify dashboard data handling --- .../realtime-compiler/src/Http/DashboardController.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/realtime-compiler/src/Http/DashboardController.php b/packages/realtime-compiler/src/Http/DashboardController.php index 84fa92ab6b7..cdc889843c4 100644 --- a/packages/realtime-compiler/src/Http/DashboardController.php +++ b/packages/realtime-compiler/src/Http/DashboardController.php @@ -34,8 +34,6 @@ */ class DashboardController extends BaseController { - public string $title; - protected bool $withConsoleOutput = true; protected bool $withSession = true; @@ -56,8 +54,6 @@ public function __construct(?Request $request = null) { parent::__construct($request); - $this->title = config('hyde.name').' - Dashboard'; - $this->loadFlashData(); if ($this->request->method === 'POST') { @@ -92,9 +88,9 @@ public function handle(): Response protected function show(): string { - return AnonymousViewCompiler::handle(__DIR__.'/../../resources/dashboard.blade.php', array_merge( - (array) $this, ['dashboard' => $this, 'request' => $this->request, 'csrfToken' => $this->generateCSRFToken()], - )); + return AnonymousViewCompiler::handle(__DIR__.'/../../resources/dashboard.blade.php', + ['title' => config('hyde.name').' - Dashboard', 'dashboard' => $this, 'request' => $this->request, 'csrfToken' => $this->generateCSRFToken()], + ); } protected function handlePostRequest(): JsonResponse