escolalms/bulk-notifications

Escola Headless LMS Bulk Notifications

0.0.7 2024-03-22 09:36 UTC

This package is auto-updated.

Last update: 2024-10-28 08:13:20 UTC


README

swagger codecov phpunit downloads downloads downloads

What does it do

This package is used to send bulk notifications through various channels. The available channels are PushNotification.

PushNotifications

Sending push notifications is through FCM (Firebase Cloud Messaging). Push messages can be sent to a list of users or to all users of the system. Messages are sent to registered FCM tokens.

Installing

  • composer require escolalms/bulk-notifications
  • php artisan migrate
  • php artisan db:seed --class="EscolaLms\BulkNotifications\Database\Seeders\BulkNotificationPermissionSeeder"

Configuration

The config.php configuration file is divided into channels.

For the push channel, you can configure:

  • service_account - FCM access key
  • base_redirect_url - base url set in notifications for the redirect_url field
[
    'push' => [
        'service_account' => [],
        'base_redirect_url' => null
    ]
];

Endpoints

All the endpoints are defined in swagger swagger

Test details codecov Tests PHPUnit in environments

Events

  • NotificationSent - The notification has been created.

The event is listened to by the escolalms/notifications package.

Permissions

Permissions are defined in seeder