How to use filament notifications with new template/view #12293
elegisandi
started this conversation in
Showcase
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use Case Scenario:
Your Livewire app and filamentphp admin panel share the same codebase, but they have different themes.
Disclaimer: Some of the instructions below can be found in the official documentation.
Let's get started!
Create your new blade template.
We'll save it at
resources/views/notifications/snackbar.blade.php
.Create a custom
Notification
class.NOTE: If you have to create more
views
, just add them in the$safeViews
array.Register the custom
Notification
class inside a service provider'sregister()
method:Now you are ready to use your custom
Notification
class using a new blade template.Set the
view
path using theview()
method just like below:NOTE: You may use either the base
Notification
class or the custom one.Hope this helps, cheers!
Beta Was this translation helpful? Give feedback.
All reactions