Hi.
I am using the multiple toaster notifications from this guide: https://laravel-livewire.com/screencasts/s8-toasters and they work great!
What I am looking to do is show a notification after saving and redirecting.
It could be like this
public function save()
{
$this->validate();
$this->post->save();
session()->flash('notify', 'Post successfully updated.');
return redirect()->to('/posts');
}
Then I am assuming that on users.php in mount I would do this:
if (request()->session()->has('notify')) {
$message = request()->session()->has('notify');
$this->dispatchBrowserEvent('notify', ['type' => 'success', 'text' => '$message']);
}
But it does nothing.
Any ideas on how I could show a notification after saving & redirecting?