Download the PHP package gdpa/chabok without Composer
On this page you can find all versions of the php package gdpa/chabok. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package chabok
Short Description Chabok Notifications driver
License MIT
Homepage https://github.com/gdpa/chabok
Informations about the package chabok
Chabok notifications channel for Laravel 5.3+
This package makes it easy to sent Chabok Notifications with Laravel 5.3+.
Contents
- Installation
- Setting up the Chabok service
- Usage
- Available Message methods
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Installation
You can install the package via composer:
Install for laravel 7:
Install for laravel 6:
Install for laravel < 5.8:
Setting up the Chabok service
Add your Chabok REST API Key to your config/services.php
:
You can add additional configuration for adding to request from config:
Note: If you want to test chabok set app_id
to sandbox
.
Usage
Now you can use the channel in your via()
method inside the notification:
In order to let your Notification know which Chabok user you are targeting, add the routeNotificationForChabok
method to your Notifiable model.
This method needs to return an uuid containing the your registered token on chabok.
Available methods
content('')
: Accepts a string value for the Chabok notification content.trackId('')
: Accepts a string value for the Chabok notification trackId.inApp()
: Call this if you want to set the Chabok notification inApp to true.live()
: Call this if you want to set the Chabok notification live to true.alert(''')
: Call this with no parameters if you want to set the Chabok notification useAsAlert to true. If you provide some string, it will set as alert text.ttl('')
: Accepts a integer value for the Chabok notification ttl.data([])
: Accepts a array for the Chabok notification data.fallback([])
: Accepts a array for the Chabok notification fallback.clientId('')
: Accepts a string value for the Chabok notification clientId.notification([])
: Accepts a array for the Chabok notification notification.idr()
: Call this if you want to set the Chabok notification idr to true.silent()
: Call this if you want to set the Chabok notification silent to true.binary('')
: Accepts a string value for the Chabok notification contentBinary.type('')
: Accepts a string value for the Chabok notification contentType.id('')
: Accepts a number value for the Chabok notification id.
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
- Morteza Poussaneh
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of chabok with dependencies
guzzlehttp/guzzle Version ^7.0.1
illuminate/notifications Version ^8.0
illuminate/support Version ^8.0