PHP code example of redbaron76 / larapush
1. Go to this page and download the library: Download redbaron76/larapush 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/ */
redbaron76 / larapush example snippets
// app/config/app.php
'providers' => array(
...
'Redbaron76\Larapush\LarapushServiceProvider',
),
// app/routes.php
Route::any('profile/{nickname}', ['as' => 'profile', function($nickname)
{
Larapush::send(['message' => 'I watch you, '.$nickname.'!'], ['profileChannel'], 'profile.visit');
return View::make('some.view');
}]);