Add page title

This commit is contained in:
philipp lang 2024-10-25 00:51:07 +02:00
parent 38fb1c36c9
commit ab8092ee97
2 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ class Layout extends Component
public function __construct(public string $pageClass = '', public string $title = '') public function __construct(public string $pageClass = '', public string $title = '')
{ {
session()->put('title', $title);
} }
public function userName(): string public function userName(): string

View File

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<title>{{ $title ?? 'Page Title' }}</title> <title>{{ session()->get('title') }} | {{ config('app.name') }}</title>
<meta name="socketport" content="{{env('SOCKET_PORT')}}" /> <meta name="socketport" content="{{env('SOCKET_PORT')}}" />
<meta name="adrema_base_url" content="/"> <meta name="adrema_base_url" content="/">
@if(auth()->id()) @if(auth()->id())