Category : websocket

I have an app that works using Laravel on the backend, and React on the frontend. We are using beyondcode/laravel-websockets to broadcast websocket messages from the Laravel server to a React client. React is able to get the message using the following code: import Echo from "laravel-echo"; window.Pusher = require("pusher-js"); const options = { broadcaster: ..

Read more

I have a problem to install the websocket to my laravel when I use this command composer require beyondcode/laravel-websockets –with-all-dependencies It will show it’s error Problem 1 – Root composer.json requires laravel/framework ^8.65, found laravel/framework[v8.65.0, …, 8.x-dev] but these were not loaded, likely because it conflicts with another require. how to ignore version or fix ..

Read more

Laravel websockets chat app working fine on local host but not working in any way on vps i have tired everything here are my configurations window.Echo = new Echo({ broadcaster: ‘pusher’, key: process.env.MIX_PUSHER_APP_KEY, wsHost: window.location.hostname, wsPort: 6001, forceTLS:false, encrypted:false, }); ‘pusher’ => [ ‘driver’ => ‘pusher’, ‘key’ => env(‘PUSHER_APP_KEY’), ‘secret’ => env(‘PUSHER_APP_SECRET’), ‘app_id’ => env(‘PUSHER_APP_ID’), ..

Read more

This is my first time working with docker. I have a laravel websocket site (php + laravel + postgresql) that needs to be put into a container. If I just execute commands (no docker): php artisan serve php artisan websockets: serve then it works successfully: Websockets dashboard http://127.0.0.1:8000/laravel-websockets Can send POST message to http://127.0.0.1:8000/telephonyCall for ..

Read more

Laravel-Websockets not working over HTTPS on Laragon (Apache) Currently I’m using the default Laragon generated SSL certificate, I’m not sure how to add the SSL certificates with my Websocket. My project directory: E:WebsiteslaravelComputerReflex My SSL Directory: E:laragonetcssl On the documention it’s mentioned to add the SSL certificate path on .env file, which I’ve tried but ..

Read more

How to run laravel websockets in laragon? when run command to start websockets php artisan websockets:serve it’s not working because https://imgur.com/ODkZC8d and its still suck there https://imgur.com/6lzEOGX this is error on browser WebSocket connection to ‘wss://nextlevelbot.test:6001/app/mykey?protocol=7&client=js&version=6.0.2&flash=false’ failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED Sourc..

Read more

i have just try like : var conn = new WebSocket(‘ws://localhost:8091’); conn.onopen = function(e) { console.log(“Connection established!”); }; conn.onmessage = function(e) { console.log( ‘on Advertiser’, e.data ); }; conn.customeSend = function(e) { console.log( ‘on Advertiser’, e.data ); }; function changeInbfcDashboard(){ // conn.send(JSON.stringify({command: “subscribe”})); var inProgressCount = 5; conn.send(JSON.stringify({inProgressCount:inProgressCount})); } function subscribe(channel) { conn.send(JSON.stringify({command: “subscribe”, channel: ..

Read more