PHP code example of georgeboot / laravel-echo-api-gateway
1. Go to this page and download the library: Download georgeboot/laravel-echo-api-gateway 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/ */
georgeboot / laravel-echo-api-gateway example snippets
use Georgeboot\LaravelEchoApiGateway\Handler;
use Illuminate\Foundation\Application;
app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();
return $app->make(Handler::class);
shell
composer avel-echo-api-gateway
# or
npm install --save-dev laravel-echo-api-gateway
yaml
functions:
# Add this function
websocket:
handler: handlers/websocket.php
layers:
- ${bref:layer.php-80}
events:
- websocket: $disconnect
- websocket: $default