vanlonden/pusher
Pusher
Setup
- run
composer require vanlonden/pusher - add
VanLonden\Pusher\PusherServiceProvider::class,to theprovidersinconfig/app.php - run
artisan vendor:publish - edit
config/pusher.phpto your liking - add your
FIREBASE_SERVER_KEYto your .env file - run
artisan migrate
Usage
// Send a push message to all users
$this->pusher->send('Title', 'A message', User::all());
// Create a future push message
$futurePush = FuturePush::create([
'time' => '2016-08-03 17:00',
'title' => 'Title',
'message' => 'A message',
]);
$futurePush->users()->saveMany(User::all());
// Send a future push message
$this->pusher->sendFuture(FuturePush::first());
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
641,106,524
9,700
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
418,291,778
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
394,964,158
4,660