Notifications in custom pages return Unable to find component: [filament.livewire.notifications]
I have a custom page that extends Filament\Pages\SimplePage.
When i use a notification, it shows up, but a litte bit later when livewire component update, it throws the error:
Unable to find component: [filament.livewire.notifications]
Tried to add the trait HasNotifications no the livewire component, but it didnt solve.
i'm throwing the notification with:
It shows up, i can also interact (close) with it, but a little later comes the error:
Can someone help me to better understand where is the problem?
here is the log from livewire snapshot:
10 Replies
Maybe this is a stupid question but, have you installed the package?
Did you add the notifications component somewhere in your layout?
https://filamentphp.com/docs/3.x/notifications/sending-notifications/
I have installed the Dashboard, so.. no need to install notifications since it comes with dashboard, right?
I'm using SimplePage, since its dashboard page, i think they already have it somewhere.. i also receive the notification, the problem comes when the livewire try to update. Also, tried to add the @livewire('notifications') in the page itself, problem still occurs.
Please screenshot of
php artisan about
I discovered that when I extend the class using Filament\Pages\SimplePage, the issue arises. However, when I change it to Filament\Pages\Resources\Page, the problem is resolved. I need to use SimplePage since I don't need the sidebar, header, etc., but I'm not sure what's causing this issue. π
I was thinking here, maybe I'm not doing things as I should. My goal is to create a custom page similar to the Login page, that is, independent and separate from the dashboard, but with just the user's avatar at the top, along with the logout option. Is there a more correct way to do this?
I understand, maybe you need to include all scripts in your source or try creating a page using Filament.
How can i create a page with fillament that doest use the dashboard itself (like sidebar, etc..) ?
like, visualy separated from the dashboard itself.
Afaik, SimplePage does that. It's what other such pages use - sign up, password reset, etc.
But the difference is that the base.blade.php layout that everything else uses includes ...
... but the simple.blade.php layout the SImplePage uses does not.
Hmm, actually, I'm not sure, it may. Looks simple gets rendered as a slot in base. And I don't have time to look deeper atm, client is paging me.
Thanks for your aswer Hugh, checking deeper, the SimplePage is rendered in base, that already as imported notification class.