PHPackages                             bnbwebexpertise/laravel-push-notifications - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. bnbwebexpertise/laravel-push-notifications

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

bnbwebexpertise/laravel-push-notifications
==========================================

Apple and Google Push Notification

1.0.11(8y ago)55.9k5[1 issues](https://github.com/bnbwebexpertise/laravel-push-notifications/issues)MITPHPPHP &gt;=5.4

Since May 11Pushed 6y ago4 watchersCompare

[ Source](https://github.com/bnbwebexpertise/laravel-push-notifications)[ Packagist](https://packagist.org/packages/bnbwebexpertise/laravel-push-notifications)[ RSS](/packages/bnbwebexpertise-laravel-push-notifications/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (4)Versions (12)Used By (0)

\[DEPRECATED\] Apple and Google Push Notifications for Laravel 5
================================================================

[](#deprecated-apple-and-google-push-notifications-for-laravel-5)

> Use Firebase Cloud Messaging

Installation
------------

[](#installation)

For Laravel 5.4 or older, add the provider in your `config/app.php` :

```
    'providers' => [
        Bnb\PushNotifications\PushNotificationsServiceProvider::class,
    ],
```

Laravel 5.5 use *Composer* auto-discovery feature.

Configuration
-------------

[](#configuration)

### Configuration via environment

[](#configuration-via-environment)

To return the APNs payloads in the results array (debugging purpose) :

```
PUSH_RETURN_PAYLOADS=true

```

#### Apple Push Notification Service

[](#apple-push-notification-service)

Put your APNs certificate somewhere inside your project path. Add the relative path to your certificate in your `.env` file :

```
PUSH_APNS_CERTIFICATE=config/push/certificate.pem

```

If your certificate is secured with a password you can specify it in the `.env` file as :

```
PUSH_APNS_PASSWORD=changeme

```

You can also set the environnement to use (default to `production`) :

```
PUSH_APNS_ENVIRONMENT=development

```

#### Google Cloud Messaging

[](#google-cloud-messaging)

Grap you API key from the Google Developer Console and add it to your `.env` file :

```
PUSH_GCM_KEY=AIaeRtYiUoP-QsDfghQJK1lMWXCvBN23AZE4RT6u

```

### Configuration via PHP

[](#configuration-via-php)

If you prefer to configure the module from a `config` PHP file, publish it :

```
php artisan vendor:publish --provider=Bnb\\PushNotifications\\PushNotificationsServiceProvider --tag=config

```

Then set the desired configuration values :

```
