Update 03-database-notifications.md

This commit is contained in:
Sam Rowden
2024-05-29 10:09:15 +01:00
committed by GitHub
parent a2f103e786
commit f8cc8605cb
@@ -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