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.
README
Section titled “README”Notifications package
What does it do
Section titled “What does it do”This package is used for logging and broadcasting notifications for all Ulams packages events.
Installation
Section titled “Installation”composer require ulams/notificationsphp artisan migratephp 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.
Endpoints
Section titled “Endpoints”All the endpoints are defined in
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:
Admin panel
Section titled “Admin panel”Left menu
Section titled “Left menu”
List of notifications
Section titled “List of notifications”
Permissions
Section titled “Permissions”Permissions are defined in seeder
Events
Section titled “Events”No Events are defined in this package.
Listeners
Section titled “Listeners”Ulams\Notifications\Listeners\NotifiableEventListener- this listener listens to all events inUlamsnamespace
Roadmap. Todo. Troubleshooting
Section titled “Roadmap. Todo. Troubleshooting”- ???
More documentation in the package
Section titled “More documentation in the package”- api/packages/notifications/ADMIN.md
- api/packages/notifications/docs/list.png
- api/packages/notifications/docs/menu.png
API endpoints
Section titled “API endpoints”| 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 |
Permissions
Section titled “Permissions”| 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 |
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”None.