Category : echo

I’m using Laradock as a development environment and using the laravel-echo-server included in it. For public channels it works normally, however when I try to use private channels I get the following error on laravel-echo-server. laravel-echo-server_1 | [1:19:22 AM] – Sending auth request to: localhost/broadcasting/auth laravel-echo-server_1 | laravel-echo-server_1 | [1:19:22 AM] – Error authenticating IHZ3HwHH9iLqb2uKAAAW ..

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

I’m currently trying to develop a flutter app that connects to a laravel server using sockets. I was following a tutorial, in which he used https://github.com/beyondcode/laravel-websockets and connected to Pusher and then from my mobile app I used Echo and Pusher Client. To be honest I’m lost in the process, and can’t really tell what’s ..

Read more

I’ve setup a notification system with Pusher and Echo on my Laravel 8 app. It works fine, I’m able to retrieve the notification event in VanillaJS with window.Echo.private(‘App.Models.User.’ + User.id) .notification((notification) => { if (notification.type === ‘AppNotificationsJobLiked’) { let count = document.getElementById(‘count’); let number = count.innerHTML; number++; count.innerHTML = number; } }); But now I ..

Read more

This is how is called my event $post = Post::create([ ‘title’ => $request->title, ‘body’ => $request->body, ‘user_id’ => auth()->id(), ]); event(new PostPublished($post)); Route for this method is Auth::routes(); Route::post(‘posts’, [AppHttpControllersHomeController::class, ‘storePost’])->name(‘posts.store’); And this is how I called broadcastOn() in my event public function broadcastOn() { return new Channel(‘post’); } And in my channels.php Broadcast::channel(‘post’, function ..

Read more

problem : socket connects successfully and its status is 101. but doesn’t get any data on event call. note : everything works perfectly on local server. Alt-Svc: h3-24=”:8443″; ma=86400, h3-23=”:8443″; ma=86400 CF-Cache-Status: DYNAMIC CF-RAY: 5555c1ef7d12d600-MXP Connection: upgrade Date: Wed, 15 Jan 2020 06:22:51 GMT Expect-CT: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct” Sec-WebSocket-Accept: kdvICu1oe8EKBkC5xoqRFMkJruA= Server: cloudflare Upgrade: websocket X-Powered-By: Ratchet/0.4.1 ..

Read more

I hope this is not a duplicate. I have the following code. I use Laravel’s Echo for Pusher Channels amid Laravel Broadcaster. Echo.private(‘UserChannel.’+user.id+’.notifications’) .listen(‘.new-notification’, (data)=>{ this.notifs.push(data); }); Is there a clean way to run a callback function after Laravel’s Echo library has successfully authenticated the private channel with the origin server? I couldn’t find something ..

Read more