PHP code example of byrontudhope / pushnotificationlaravel

1. Go to this page and download the library: Download byrontudhope/pushnotificationlaravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

byrontudhope / pushnotificationlaravel example snippets


'providers' => array(
    'ByronTudhope\LaravelPushNotification\PushNotificationServiceProvider'
)

'aliases' => array(
	'PushNotification'      => 'ByronTudhope\LaravelPushNotification\PushNotification',
)

array(
    'iOS'     => [
        'environment' => env('IOS_PUSH_ENV', 'development'),
        'certificate' => env('IOS_PUSH_CERT', __DIR__ . '/ios-push-notification-certificates/development/'),  
        'passPhrase'  => env('IOS_PUSH_PASSWORD', '291923Job'),
        'service'     => 'apns'
    ],

    'android' => [
        'environment' => env('ANDROID_PUSH_ENV', 'development'),
        'apiKey'      => env('ANDROID_PUSH_API_KEY', 'yourAPIKey'),
        'service'     => 'gcm'
    ]
);


PushNotification::app('iOS')
                ->to($deviceToken)
                ->send('Hello World, i`m a push message');


php artisan vendor:publish