Skip to content

Commit

Permalink
Simplify dashboard data handling
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 13, 2023
1 parent 3b96bc2 commit d2d3a3e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/realtime-compiler/src/Http/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
*/
class DashboardController extends BaseController
{
public string $title;

protected bool $withConsoleOutput = true;
protected bool $withSession = true;

Expand All @@ -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') {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d2d3a3e

Please sign in to comment.