Download the PHP package yakoffka/laravel-notification-channels-ru-store without Composer
On this page you can find all versions of the php package yakoffka/laravel-notification-channels-ru-store. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yakoffka/laravel-notification-channels-ru-store
More information about yakoffka/laravel-notification-channels-ru-store
Files in yakoffka/laravel-notification-channels-ru-store
Package laravel-notification-channels-ru-store
Short Description RuStore push notifications channel for Laravel
License MIT
Homepage https://github.com/yakoffka/laravel-notification-channels-ru-store
Informations about the package laravel-notification-channels-ru-store
Please see this repo for instructions on how to submit a channel proposal.
//: # ()
This package makes it easy to send notifications using [RuStore](link to service) with Laravel 10.x.
Contents
- Installation
- Setting up the RuStore service
- Usage
- Available Message methods
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Installation
Установите пакет с помощью команды:
Затем опубликуйте конфигурационный файл:
и обновите ваш .env, указав там значения, полученные в RuStore консоли
Setting up the RuStore service
Optionally include a few steps how users can set up the service.
Usage
В классе, использующим трейт Notifiable (например User), необходимо реализовать метод, возвращающий массив токенов уведомляемого пользователя:
Затем создать класс уведомления, в методе via() которого указать канал отправки RuStoreChannel и добавить метод toRuStore():
Проверка отправки уведомлений
Для контроля отправляемых уведомлений можно воспользоваться событиями, поджигаемыми после отправки:
- cобытие NotificationSent содержит отчет RuStoreReport в свойстве response:
- cобытие NotificationFailed содержит отчет RuStoreReport в свойстве data['report']:
Метод RuStoreReport::all() вернет коллекцию отчетов RuStoreSingleReport об отправке уведомлений на конкретное устройство с push-токенами в качестве ключей
Пример использования события NotificationSent:
NOTE: Событие NotificationSent поджигается только в случае наличия успешно отправленных сообщений.
Пример использования события NotificationFailed:
NOTE: Событие NotificationFailed поджигается только в случае наличия хотя-бы одной неуспешной отправки.
Available Message methods
Сообщение поддерживает все свойства, описанные в документации
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
- yakOffKa
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-notification-channels-ru-store with dependencies
illuminate/notifications Version ~10.0 || ~11.0
illuminate/support Version ~10.0 || ~11.0