attributes->get('workspace', 'main'); $this->workspace = $workspaceService->get($slug) ?? $workspaceService->get('main'); // Load workspace content from native content $this->loadContent(); } protected function loadContent(): void { try { $workspaceModel = Workspace::where('slug', $this->workspace['slug'])->first(); if (! $workspaceModel) { $this->content = ['posts' => [], 'pages' => []]; $this->loading = false; return; } $render = app(ContentRender::class); $homepage = $render->getHomepage($workspaceModel); $this->content = [ 'posts' => $homepage['posts'] ?? [], 'pages' => [], // Pages not included in homepage response ]; } catch (\Exception $e) { $this->content = [ 'posts' => [], 'pages' => [], ]; } $this->loading = false; } public function render() { return view('tenant::web.workspace.home') ->layout('components.layouts.workspace', [ 'title' => $this->workspace['name'].' | Host UK', 'workspace' => $this->workspace, ]); } }