In this article i will talk about sending pushing notifications to mobile devices with laravel ! i will be doing this by using a laravel package called Laravel Push Notification which allows us send push notication ! one good thing baout this package is that it supports both Laravel 5 & Lumen framework so lets get started

 

Installation

Update your composer.json file to include this package as a dependency

Laravel 5 & Lumen

"davibennun/laravel-push-notification": "dev-laravel5"

Laravel 4.*

"davibennun/laravel-push-notification": "dev-master"

Register the PushNotification service provider by adding it to the providers array.

'providers' => array(
    ...
    'DavibennunLaravelPushNotificationLaravelPushNotificationServiceProvider'
)

Alias the PushNotification facade by adding it to the aliases array in the app/config/app.php file.

'aliases' => array(
    ...
    'PushNotification' => 'DavibennunLaravelPushNotificationFacadesPushNotification'
)

Advertisements