Closed farshid-ahmadian closed 3 years ago
Do you know if your auth endpoint is being correctly invoked? Do you have any logging there? Are any error messages returned in your client when subscribing to the private channels?
@ben-pusher hey there, yes I checked all of this. i explained all of my codes in here i will be gratefull to helpme
I can't see any information there about logging on your auth endpoint and what is happening with the authentication request at your server side. My suspicion is that the authentication for the private channel subscription is failing.
@ben-pusher hey there, if auth endpoint has problem. irecieve 500 error in console. i checked all of this. and i describe the problem and some additional data in here . thank you 🌺
in App\Providers\BroadcastServiceProvider.php
public function boot()
{
Broadcast::routes();
require base_path('routes/channels.php');
}
we dont need any middleware!!
Description:
I use pusher and laravel-echo to create chat app in laravel. public Channels work properly.
I use pusher.com debug console and I realized in PrivateChannel laravel-echo can't subscribe users to Available private channels automaticaly. notice that commented codes is for public channel.
App\Events\ChatBroad.php
is:routes/channels.php
is:and in
App\Providers\BroadcastServiceProvider
i use this middleware:Broadcast::routes(['middleware' => ['auth']]);
bootstrap.js
is:blade view file: