1. Go to this page and download the library: Download matriphe/gcm 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/ */
matriphe / gcm example snippets
'Matriphe\Gcm\GcmServiceProvider'
'Gcm' => 'Matriphe\Gcm\GcmFacade'
$device_id = '30C89D80C48E96AE';
$gcm_id = 'APA91bGfw8y8DG6CL1BOraVDJyYXUU82rwzbJjnR5PppIcSE7HYgQSvxiSHMJN7zYiCC9CLGNHLiWMxUD22JrlSmvMkaJiUgCsMOvHk0BPeWmvGJu4oHAa1KUm9D5ngdcFNNUwJQ7ttB6VW0F575rhQ2ow56ACM1Yg';
$subject = 'Test Push Subject';
$message = 'This is the message that will be shown in notification.';
$extras = [
'id' => 21,
'user' => 'motherfather',
];
Gcm::push($device_id, $gcm_id, $subject, $message, $extras = [])
bash
php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.