A simple wrapper around Gomoob's php-pushwoosh package for integration with the Laravel framework.
Use Composer to pull this package in as a dependency.
composer require contextmapp/laravel-pushwooshIf you are using Laravel 5.4 or lower, or if you have disabled package
discovery, add the provider to the providers array in config/app.php:
Contextmapp\Pushwoosh\PushwooshServiceProvider::classIf you want to use the Pushwoosh facade, you should
also add the correct alias to the aliases array:
'Pushwoosh' => Contextmapp\Pushwoosh\Facades\Pushwoosh::classYou should publish the configuration file that is supplied with this package to set up your Pushwoosh details.
php artisan vendor:publish --provider=Contextmapp\Pushwoosh\PushwooshServiceProviderThis command copies the configuration file to config/pushwoosh.php.
Make sure you set up the api_token and application_id of the default
application.
You can use the wrapper to interact with the Pushwoosh SDK directly, or, you could add support for Pushwoosh to your Laravel notifications.
If you are using Laravel's notification system, you can add 'pushwoosh' to the via() response of a notification.
The channel name is also available as a class constant on the Contextmapp\Pushwoosh\PushwooshChannel class.
The notification class is expected to implement the Contextmapp\Pushwoosh\Contracts\PushwooshNotification contract.
Your notifiable classes should implement the Contextmapp\Pushwoosh\Contracts\PushwooshNotifiable contract.