I have literally wasted the entire day on this...
There's your problem. You're welcome. 🫡
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to use Redis for the first time. My goal is to broadcast a message to my SPA in Vue3 so that all users can get real time updates. I have managed to setup Redis and events in Laravel. I tested with redis CLI and I can see the message when user gets updated.
What I am having difficulties with is trying to get that message from Vue. I tried literally everything... couple of AI models, stackoverflow, youtube, docs... EVERYTHING. Tried Websockets, laravel-echo and socketio, some native websocket... everything
No matter what I did, I would get an error in Vue. And I think the main reason is that I am not familiar with websocekts or redis, so maybe I am using wrong terminology when I google or try to ask AI
To make things worse, it's always a different error... (If I knew I would end up here, I would have write them all down :D) So it is either websocket cant be found, or echo cant be found... then I would import it from bootstrap.js instead of main.js. Than it would be found, but some other sub package could not be found... In the end, I tried with native sockets, and I have gotten the message that I can't connect. So I ran CONFIG GET CONFIG_OPTIONS in redis CLI and I get an empty array...
I don't know what is it... Is it something that I didn't set up in redis? Is it possible I am importing socketio laravel-echo websockets, etc from the wrong place ? Because I am also pretty new to Vite, and it's a little confusing, but still I was able to import other packages I needed.
All I want is to broadcast a message and catch it with vue in real time. Is redis a right choice even?
I have literally wasted the entire day on this...
Someone, please help :D
I tried using laravel-echo and socketio
I tried websockets
I tried integrated Websocket
For the first 2 I would always get "can't find some kind of package" and irritating thing is that it's always something else. So when I get the "cant find or cant import" I would try to import from main.js instead of bootstrap.js or create an alias in vite, and then. I would get "can't import {something else}"....
For native Websocket, I jsut get "can't connect"...
Once again. I am 100% possitive laravel is broadcasting properly
Please or to participate in this conversation.