F
Filament17mo ago
Priyank

Does the Notification modal load outside of the Admin Panel too?

Hi, I am trying to show the notifications to my user in frontend and I am following the guide here https://filamentphp.com/docs/2.x/notifications/database-notifications The thing is the trigger button is not appearing on my frontend. Is it that the default notification only works inside the Filament Admin Panel ?? Please guide.
Filament
Database notifications - Notifications - Filament
Elegant TALL stack notifications for Laravel artisans.
8 Replies
toeknee
toeknee17mo ago
Yep it does, you just need to install it correctly as per the notifications installation.
Priyank
PriyankOP17mo ago
@toeknee_iom okay. i installed it and i am getting notifications. But i am using Database Notifications now and i want to display them to the user in frontend with Trigger button but the button is not showing up in frontend. Which documentation should i follow for that to work ?
toeknee
toeknee17mo ago
Did you follow the documentation for adding the frontend notification icon?
Priyank
PriyankOP17mo ago
Filament
Database notifications - Notifications - Filament
Elegant TALL stack notifications for Laravel artisans.
toeknee
toeknee17mo ago
Include: <div id="notifications"> @livewire('notifications') </div> in your frontend app blade IIRC
Priyank
PriyankOP17mo ago
Yes i created the Trigger view in my resources/views/notifications/database-notifications-trigger.blade.php And then i add the trigger in Filament config file And then i add the code you gave me in my frontend blade file But the notification trigger button is not rendered in the blade file. What may be the causes ? Even the code which is given in last part of the document where we can open the notification modal from anywhere is not working <button x-data="{}" x-on:click="$dispatch('open-modal', { id: 'database-notifications' })" type="button" > Notifications </button>
toeknee
toeknee17mo ago
What happens when you view the console? Did you rebuild the assets?
Priyank
PriyankOP17mo ago
no errors in the console and yes i build the asset again but the icon does not show the bell icon shows perfectly in Admin panel but outside admin panel it is not showing, the livewire component is detected but the bell icon does not appear
Want results from more Discord servers?
Add your server