Notifications

Codacy BadgeStyleCILicenseTotal DownloadsLatest Stable Version

Notifications functionality dependency for Laravel Enso

Watch the demo

click on the photo to view a short demo in compatible browsers

Features

  • uses Pusher and Laravel's notification infrastructure to bring minimal-setup notification functionality
  • users can also be notified via email
  • allows the lazy loading of notifications
  • read and unread notifications are visually differentiated and can be manually/automatically marked as read, as well as cleared
  • polymorphic relationships are used, in order to be able to attach notifications to any entity
  • supports and uses Desktop Notifications if allowed by the user

Installation Steps

If not registered already, register on Pusher and then set your credentials in your .env file:

BROADCAST_DRIVER=pusher
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=

Once set, these credentials are set during the application init phase.

Desktop Notifications

On the first web application page load, the app will ask the user whether he wants to allow or block Desktop Notifications.

If enabled, Desktop Notifications are used for any and all notifications that are received when the application is open in a tab but the tab is not visible, the web browser is minimized, etc. If any notifications are received while the web application tab is active, Desktop Notifications will not be created - regular toaster notifications will be shown instead.

When clicking on a desktop notification, the browser will switch to the web application's tab.

Publishes

  • php artisan vendor:publish --tag=notifications-assets - notification js assets, pages
  • php artisan vendor:publish --tag=enso-assets - a common alias for when wanting to update the assets, once a newer version is released, usually used with the --force flag

Notes

The Laravel Enso package comes with this package included.

Depends on:

Last Updated: 11/12/2018, 4:35:32 PM