PHP code example of farhatabbas / laravel-faye

1. Go to this page and download the library: Download farhatabbas/laravel-faye 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/ */

    

farhatabbas / laravel-faye example snippets


Farhatabbas\Faye\FayeServiceProvider::class,

'Faye' => Farhatabbas\Faye\Facade\Faye::class,

php artisan vendor:publish

use Farhatabbas\Faye\Facade\Faye;

Route::get('/',function(){
   Faye::send("/channel", ['data'=>'Hello World!'], ['token'=>'123456789']);
});