laravel-echo

Laravel echo is no listening

。_饼干妹妹 提交于 2020-12-06 09:00:50
问题 i'm from venezuela, i've a problem tryging to integrate laravel echo with a project, i try everything and i wanna receive your help. maybe i'm not working with the right way. i'm trying to use broadcasting events with socket io because i'm working in a startup and is very difficult pay a services like pusher. i'm trying to do a simple real time chat.. That is my chatController.. public function index(Request $request){ $sender=Auth::user()->id; $receiver=\App\User::find(2); $message=new

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

限于喜欢 提交于 2020-11-27 04:50:52
问题 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 it. 回答1: Look in config/app.php if you have uncommented App\Providers\BroadcastServiceProvider::class, 回答2: There are two Service Providers with Same name but different namespace in config/app.php Illuminate\Broadcasting\BroadcastServiceProvider::class,

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

和自甴很熟 提交于 2020-11-27 04:50:31
问题 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 it. 回答1: Look in config/app.php if you have uncommented App\Providers\BroadcastServiceProvider::class, 回答2: There are two Service Providers with Same name but different namespace in config/app.php Illuminate\Broadcasting\BroadcastServiceProvider::class,

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

余生颓废 提交于 2020-11-27 04:49:26
问题 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 it. 回答1: Look in config/app.php if you have uncommented App\Providers\BroadcastServiceProvider::class, 回答2: There are two Service Providers with Same name but different namespace in config/app.php Illuminate\Broadcasting\BroadcastServiceProvider::class,

Laravel Broadcast Channels - check connections

﹥>﹥吖頭↗ 提交于 2020-06-27 09:53:23
问题 I can't find this in the docs or by searching, maybe someone has some tips. I'm trying to check how many connections are on a presence channel on the backend. I can check fine on the front-end with Echo like so: Echo.join('chat') .here((users) => { // users.length is the proper count of connections }) But is there a way I can get that same number of connections, but in the backend code somewhere within Laravel? 回答1: If you are using Pusher, the backend can just do the following: $response =

Laravel Echo with Pusher and Vue

﹥>﹥吖頭↗ 提交于 2020-06-26 13:57:12
问题 I use Laravel as a server part and Vue Cli as a client. Also I use https://docs.beyondco.de/laravel-websockets/ But I have a errors in console log when i try connect vue client to laravel websockets. WebSocket connection to 'ws://http//websockets.test:6001/app/myKey?protocol=7&client=js&version=5.1.1&flash=false' failed: Connection closed before receiving a handshake response WebSocket connection to 'wss://http//websockets.test:443/app/myKey?protocol=7&client=js&version=5.1.1&flash=false'

Laravel echo: channel authorization

泪湿孤枕 提交于 2020-05-24 07:09:53
问题 From the Broadcasting documentation Broadcast::channel('order.{orderId}', function ($user, $orderId) { return $user->id === Order::findOrNew($orderId)->user_id; }); All authorization callbacks receive the currently authenticated user as their first argument and any additional wildcard parameters as their subsequent arguments. In this example, we are using the {orderId} placeholder to indicate that the "ID" portion of the channel name is a wildcard. The sentence All authorization callbacks