tzsk / push
Pushwoosh for Laravel
Requires
- php: ~5.6|~7.0
- gomoob/php-pushwoosh: ^1.7
- illuminate/support: ~5.1
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-11-29 05:20:48 UTC
README
This is a Laravel 5 Package
for Pushwoosh Notification Integration. This package currently supports IOS & Android
other support is coming soon.
This package is built upon gomoob/php-pushwoosh package. With feew changes and Laravel 5 Compatibility.
This package is compatible with Laravel 5.2 or Higher. Old version support (Laravel 5.1.*) is coming soon for those who are still using PHP 5.4.*
Install
Via Composer
$ composer require tzsk/push
Configure
config/app.php
'providers' => [ ... Tzsk\Push\Provider\PushServiceProvider::class, ... ], 'aliases' => [ ... 'Push' => Tzsk\Push\Facade\Push::class, ... ],
To publish the Configuration file in config/push.php
Run:
php artisan vendor:publish
Usage
use Tzsk\Push\Facade\Push; ... $response = Push::send("Message Text", function($push) { $push->setToken("Device Token"); # OR... $push->setTokens(["Device 1", "Device 2"]) ->setTitle("You have a new notification") # For Android. ->setBody("Message Text") # To override the Message. Optional. ->setBadge(1) # Default: 1. ->setPayload(["type" => "ANYTHING", "data" => [] ]) # Default: [] ->setIcon("http://path/to/icon.png") # For Android. ->setSmallIcon("pw_notification.png") # For Android. ->setBanner("http://path/to/banner.png") # For Android. Optional. ->setSound("res/sound/file/path") # Default: "default" ->setPriority(1) # Default: 1 ->setVibration(1) # Default: 1 ->setIbc("#ffffff"); # Icon Background Color. Default: '#ffffff' }); if ($response->isOk()) { # Successfully Sent. } else { # Something went wrong. echo $response->getStatusMessage(); # Get failure message. } ...
Change log
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email mailtokmahmed@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.