mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Update 03-database-notifications.md
This commit is contained in:
@@ -23,7 +23,7 @@ php artisan notifications:table
|
||||
|
||||
## Rendering the database notifications modal
|
||||
|
||||
> If you want to add database notifications to a panel, [follow this part of the guide](#adding-database-notifications-to-a-panel).
|
||||
> If you want to add database notifications to a panel, [follow this part of the guide](#adding-the-database-notifications-modal-to-a-panel).
|
||||
|
||||
If you'd like to render the database notifications modal outside of the [Panel Builder](../panels), you'll need to add a new Livewire component to your Blade layout:
|
||||
|
||||
@@ -98,6 +98,8 @@ $recipient->notify(
|
||||
);
|
||||
```
|
||||
|
||||
> Database notifications dispatched with `sendToDatabase` and `toDatabase` are queued. Ensure your queue is running to receive notifications dispatched in these ways.
|
||||
|
||||
Alternatively, use a traditional [Laravel notification class](https://laravel.com/docs/notifications#generating-notifications) by returning the notification from the `toDatabase()` method:
|
||||
|
||||
```php
|
||||
|
||||
Reference in New Issue
Block a user