{"repo":"georgeboot/laravel-echo-api-gateway","free":true,"listed":false,"github":"https://github.com/georgeboot/laravel-echo-api-gateway","clone":"git clone https://github.com/georgeboot/laravel-echo-api-gateway.git","description":"Use Laravel Echo with API Gateway Websockets. Works with Bref.sh and Laravel Vapor.","language":"PHP","stars":106,"topics":["laravel","laravel-vapor","laravel-echo","api-gateway","websocket","bref"],"license":"MIT","category":"networking-infra","readme_excerpt":"laravel-echo-api-gateway This package enables you to use API Gateway‘s Websockets as a driver for Laravel Echo , so you don’t have to use services like Pusher or Socket.io. It works by setting up a websocket API in API Gateway, and configure it to invoke a Lambda function, every time a message is sent to the websocket. This package includes and autoconfigures a handler to respond to these websocket messages. We also configure Laravel to use this connection as a broadcast driver. This package currently only works with either Bref or Laravel Vapor, though the latter one involves some manual set-up. Requirements In order to use this package, your project needs to meet the following criteria: - PHP 8.x - Laravel 6 to 12 - Uses either bref or Laravel Vapor to deploy to AWS - Has a working queue - Uses Laravel Mix or any other tool to bundle your assets Installation Installation of this package is fairly simply. First we have to install both the composer and npm package: Platform-specific instructions A. When using Bref Next, when using Bref, we have to add some elements to our serverless.yml file. If using Vapor, these resources have to be created by hand using the AWS CLI or console. Add a new function that will handle websocket events (messages etc): Add a resource to create and configure our DynamoDB table, where connections will be stored in: Add the following iamRoleStatement to enable our Lambda function to access the table: Add an environment variable to autogenerate our we","default_branch":null,"files":null,"tree":[],"storefront":"/r/georgeboot","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/georgeboot/laravel-echo-api-gateway/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}