diff --git a/app/View/Page/Layout.php b/app/View/Page/Layout.php index d136065d..8619ee34 100644 --- a/app/View/Page/Layout.php +++ b/app/View/Page/Layout.php @@ -9,6 +9,7 @@ class Layout extends Component public function __construct(public string $pageClass = '', public string $title = '') { + session()->put('title', $title); } public function userName(): string diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php index c94be427..52f704a4 100644 --- a/resources/views/components/layouts/app.blade.php +++ b/resources/views/components/layouts/app.blade.php @@ -4,7 +4,7 @@ - {{ $title ?? 'Page Title' }} + {{ session()->get('title') }} | {{ config('app.name') }} @if(auth()->id())