Category : laravel-echo

I am trying to create a listener for ‘typing’ event using Laravel Echo and Pusher, and laravel websockets. I have managed to send the whisper event to pusher, which is sent successfully and my pusher console displays the received event as below myAppId: connection id 60612368.93289095 received message: {"event":"client-typing","data":52,"channel":"private-message.52.1"}. However, on the receiving end, I ..

Read more

I am sending broadcast notification using private channel. I am using pusher and laravel-echo. I have uncommented both IlluminateBroadcastingBroadcastServiceProvider::class, ‘Broadcast’ => IlluminateSupportFacadesBroadcast::class, in config/app.php. I am using web routes and using ‘auth:sanctum’ middleware. BroadcastServiceProvider.php public function boot() { Broadcast::routes(); //Broadcast::routes([‘auth:sanctum’]); require base_path(‘routes/channels.php’); } I have tries using both ways. bootstap.js import Echo from ‘laravel-echo’; window.Pusher ..

Read more

I am using Beyondco websockets for hosting my own web socket server. I’ve done a complete setup as per the documentation but I see a problem that Larvel echo is not listening to the events. I am able to see all the events in browser ws. My .env settings BROADCAST_DRIVER=pusher PUSHER_APP_ID=appId PUSHER_APP_KEY="12345" PUSHER_APP_SECRET=appSecret PUSHER_APP_CLUSTER=mt1 Broadcasting.php ..

Read more

I have these values in env: BROADCAST_DRIVER=pusher QUEUE_CONNECTION=database PUSHER_APP_ID=some_id PUSHER_APP_KEY=some_key PUSHER_APP_SECRET=some_secret PUSHER_APP_CLUSTER=some_cluster This is how I broadcast the event broadcast(new MessageSent(auth()->user(), $message)); MessageSent: class MessageSent implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; public $user; public $message; public function __construct(User $user, Message $message) { $this->user = $user; $this->message = $message; } public function broadcastOn() { return ..

Read more

I am using Laravel Notification via broadcast channel. Other notifications works fine except for this one notification. It just stays on Processing status and doesn’t get Processed after waiting for a couple of hours. Here is a sample of the log that shows when running php artisan queue:work redis –queue=default [2021-06-20 03:03:18][KzdWk12nVnZ1kHW88SjVNF3QoLF7ZPUe] Processing: IlluminateNotificationsEventsBroadcastNotificationCreated [2021-06-20 ..

Read more

I came across a weird thing while using Laravel Echo Server in NuxtJs, Redis, and Laravel 8. Laravel Echo in NuxJs sends a WS message that looks like this: 42["subscribe",{"channel":"container-details-3","auth":{"headers":{"Authorization":"Bearer ****"}}}] I am using API auth like this: Broadcast::routes([‘middleware’ => [‘auth:api’]]); This is failing because the request that comes through to my private channel auth ..

Read more

I’m using laravel WebSockets and it listening to all channels but Laravel Echo not listening to private channels it listening only to public channels Websocket Log channels.php use IlluminateSupportFacadesBroadcast; Broadcast::channel(‘user.{id}’, function ($user, $id) { return true; }); Class of the Event class TicketAssigned implements ShouldBroadcastNow { use Dispatchable, InteractsWithSockets, SerializesModels; public $message; public $user; public ..

Read more

I have this weird issue I can’t fix with authenticating private channels. I am using Laravel 8, NuxtJS (SPA app), Redis, and separate Docker containers for everything. When I am trying to listen in my SPA NuxtJs app for private channel I get following error: 42["subscription_error","private-robert-test-1",0] I assume this is because of my echo confing ..

Read more

I’ve been trying to find a solution to this for a year and a half, here’s another of my posts regarding this issue with no solution in sight https://github.com/beyondcode/laravel-websockets/issues/322 Since that post nothing has changed, I have relatively the lastest version of all my resources involved (updated last month and a half) package.json "laravel-echo": "^1.10.0", ..

Read more

The echo server was working and clients were listening to server but after installing laravel passport it reports error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ‘http://fake.com:6001/socket.io/?EIO=3&transport=polling&t=Ncul7AB’. (Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’) Here is configureation cors.php <?php return [ ‘paths’ => [‘*’], ..

Read more

I’m using Beyondco Larevel Websockets on my Laravel Backend, and using pusher_client and laravel_echo on my Flutter frontend. I’ve been trying to connect from my ios simulator into my Laravel Backend host, which is using valet secure, but failing. My Flutter connections: PusherClient getPusherClient(String token) { PusherOptions options = PusherOptions( host: ‘my-local-server.test’, wsPort: 6001, wssPort: ..

Read more

I want to use broadcast to understand when does the job finish and use pusher,laravel-echo and redis. When I run "php artisan queue:listen redis" dd in broadcast works but nothing happens in livewire component. showMessage method not working. Broadcast public function broadcastOn() { return new Channel(‘product-channel’); } Livewire component class ProjectActions extends Component { protected ..

Read more