Update 03-database-notifications.md

This commit is contained in:
Hammad Zafar
2024-09-26 13:35:11 +05:00
committed by GitHub
parent db98907c03
commit 4a1d90ef2b
@@ -142,7 +142,6 @@ DatabaseNotifications::pollingInterval(null);
Alternatively, the package has a native integration with [Laravel Echo](https://laravel.com/docs/broadcasting#client-side-installation). Make sure Echo is installed, as well as a [server-side websockets integration](https://laravel.com/docs/broadcasting#server-side-installation) like Pusher.
Once websockets are set up, after sending a database notification you may dispatch a `DatabaseNotificationsSent` event, which will immediately fetch new notifications for that user:
Once websockets are set up, you can automatically dispatch a `DatabaseNotificationsSent` event by setting the `isEventDispatched` parameter to `true` when sending the notification. This will trigger the immediate fetching of new notifications for the user:
```php