vanlonden / pusher
There is no license information available for the latest version (dev-master) of this package.
Firebase wrapper library for Laravel
dev-master
2016-08-16 19:27 UTC
Requires
- doctrine/dbal: ^2.5
- guzzlehttp/guzzle: ^6.2
This package is not auto-updated.
Last update: 2026-03-29 03:41:19 UTC
README
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());