Questions tagged [laravel-echo]

Use for problems with laravel-echo, the official laravel WebSocket implementation.

laravel-echo makes it easy to "broadcast" your events over a WebSocket connection. Broadcasting your Laravel events allows you to share the same event names between your server-side code and your client-side JavaScript application.

Laravel-echo comes bundled with all laravel 5.4 and up installations.
There are default configurations for Pusher, Redis and log drivers. Finally a null driver is available to disable broadcasting.

Configuration can be found at config/broadcasting.php

Source: Github repository
Official Documentation: Broadcasting

487 questions
26
votes
1 answer

Laravel Echo - default.a.channel is not a function

I'm trying to setup Laravel Echo with pusher, to implement real time notifications. First, i have installed Laravel Echo and Pusher: npm install --save laravel-echo pusher-js After this, in bootstrap.js i have uncomment the code (as guide…
Mistre83
  • 2,253
  • 6
  • 30
  • 59
21
votes
1 answer

pm2 managed process in errored state after machine reboot

I'm using pm2 (version 3.4.1) to manage the Laravel Echo websocket server. It runs perfect, but I'm trying to get it to auto-start after a machine reboot (which runs Ubuntu 16.04). To do this I followed these instructions: $ pm2 startup [PM2] Init…
kramer65
  • 39,074
  • 90
  • 255
  • 436
19
votes
6 answers

http://localhost:8000/broadcasting/auth 404 (Not Found)

I am trying to make my app app connect to pusher on a private channel. But I am getting the following error: pusher.js?b3eb:593 POST http://localhost:8000/broadcasting/auth 404 (Not Found) What maybe the cause of the error and how to resolve…
YaSh Chaudhary
  • 2,027
  • 5
  • 31
  • 65
16
votes
4 answers

How to use socket.io-client in angular 4

Server side is php laravel echo websocket and I am trying to connect by Angular 4. I tried using ng2-socket-io - npm and also laravel-echo - npm but none of them were successfully. If anyone know any documentation or tutorial how I can use it,…
16
votes
9 answers

Laravel /broadcasting/auth Always Fails With 403 Error

I have recently delved into Laravel 5.3's Laravel-Echo and Pusher combination. I have successfully set up public channels and moved on to private ones. I am having trouble with Laravel returning a 403 from the /broadcasting/auth route, no matter…
user2321275
  • 309
  • 1
  • 2
  • 8
12
votes
1 answer

Broadcasting eloquent events using observers

Currently I am using observers to handle some stuff after creation and updating of my models. I want to update my app by making it real-time using laravel-echo but I am not able to find documentation regarding the use of laravel-echo in combination…
milo526
  • 4,631
  • 4
  • 38
  • 55
12
votes
2 answers

Laravel Echo never recieving event

For whatever reason, I cannot receive any data on my client side from laravel echo. I am using laravel-echo-server (socket.io), redis broadcaster, and redis queues. As far as I can tell, they are all functional. I'll take you through how I set it up…
Dastur
  • 620
  • 6
  • 22
11
votes
2 answers

Laravel echo server not working in production server

I am having problem with socket.io as a broadcaster with laravel echo. What have I tried: php artisan cache:clear php artisan config:clear I can see users connecting within the logs: 0|Socket-Connection | [11:17:00 AM] - ********** joined channel:…
z0mbieKale
  • 905
  • 13
  • 37
10
votes
1 answer

Laravel Echo 'Client can not be authenticated, got HTTP status 405'

I am able to run laravel-echo-server on my local environment using HTTPS settings just fine. However, it seems that there is an issue on my production server (which is Forge-based): Client cannot be authenticated, got HTTP status 405 I was able to…
mdobrenko
  • 1,185
  • 2
  • 19
  • 47
9
votes
6 answers

Laravel Echo - Allow guests to connect to presence channel

I am using laravel-echo-server to run Laravel Echo to broadcast events. I have a user counter channel which shows all the users on the app. For this I am using a presence channel. This works fine for logged in users, but guests just never get…
Josh Undefined
  • 1,368
  • 3
  • 15
  • 23
9
votes
5 answers

Laravel event not being Broadcast

I am working on a chat/message feature for an app. When a User sends a message, I want a specific Event to be triggered and to be broadcasted. I am then wanting Laravel Echo to listen on the event's broadcast channel to an event via Laravel Echo,…
AshMenhennett
  • 1,055
  • 4
  • 14
  • 24
8
votes
1 answer

how can I use laravel echo without laravel framework and npm

Is any way to use Laravel-echo library without Laravel framework and NPM? just use