Skip to content

Package: notifications

Generated from api/packages/notifications

Source: api/packages/notifications · imported version 0.3.2. The sections after the README are extracted from the code on every docs build.

Notifications package

This package is used for logging and broadcasting notifications for all Ulams packages events.

  • composer require ulams/notifications
  • php artisan migrate
  • php artisan db:seed --class="Ulams\Notifications\Database\Seeders\NotificationsPermissionsSeeder"

All events emitted by Ulams packages will be logged in database and can be listed through API (and Admin Panel). There is a configuration file in which you can define events which should be excluded from being stored.

All the endpoints are defined in swagger

Run ./vendor/bin/phpunit --filter 'Ulams\\Notifications\\Tests' to run tests. See tests folder as it’s quite good staring point as documentation appendix.

Test details:

Menu

List of notifications

Permissions are defined in seeder

No Events are defined in this package.

  • Ulams\Notifications\Listeners\NotifiableEventListener - this listener listens to all events in Ulams namespace
  • ???
Method Path Auth Action
GET /api/notifications NotificationsController@user
GET /api/notifications/events NotificationsController@events
POST /api/notifications/{notification}/read NotificationsController@read
POST /api/notifications/read-all NotificationsController@readAll
GET /api/admin/notifications/events yes NotificationsController@events
POST /api/admin/notifications/{notification}/read yes NotificationsController@read
GET /api/admin/notifications yes NotificationsController@user
GET /api/admin/notifications/all yes NotificationsController@index
GET /api/admin/notifications/{user} yes NotificationsController@user
POST /api/admin/notifications/read-all yes NotificationsController@readAll
Permission Seeded for roles Constant
dashboard-app_notification-list_access admin NotificationsPermissionsEnum::READ_ALL_NOTIFICATIONS
dashboard-app_notification-list_access_self admin NotificationsPermissionsEnum::READ_NOTIFICATION_EVENTS_LIST

Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).

None.

None.

None.

None.

None.