1. Go to this page and download the library: Download brainboxlabs/brain-socket 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/ */
Event::listen('generic.event',function($client_data){
return BrainSocket::message('generic.event',array('message'=>'A message from a generic event fired in Laravel!'));
});
Event::listen('app.success',function($client_data){
return BrainSocket::success(array('There was a Laravel App Success Event!'));
});
Event::listen('app.error',function($client_data){
return BrainSocket::error(array('There was a Laravel App Error!'));
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.