Level 11
Try with this :
<title>{{ Livewire\Volt\getSharedData()['title'] ?? config('app.name', 'Laravel') }}</title>
I'm getting stuck when trying to set the page title from my full page Volt component to the app.blade layout page title.
I'm setting the title property in users.blade.php:
use App\Models\User;
use function Livewire\Volt\{state,title};
$users = User::all();
state(
[
'users' => $users,
]
);
title('Users');
Then in my app.blade layout file I'm pulling it in like so:
<title>{{ $title ?? config('app.name', 'Laravel') }}</title>
Any thoughts on what I'm doing wrong?
Please or to participate in this conversation.