PHP code example of aliasproject / laravel-echo-api-gateway

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

    

aliasproject / laravel-echo-api-gateway example snippets




use AliasProject\LaravelEchoApiGateway\Handler;
use Illuminate\Foundation\Application;

p->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