pusher-js

Laravel (Echo, Sanctum, websockets) + Pusher + Nuxtjs SPA

你说的曾经没有我的故事 提交于 2021-01-29 07:33:37
问题 I'm trying to send events to private channel, but I can't receive them. Otherwise it works fine for public channels. Here's my code : Plugin : Echo.js window.Echo = new Echo({ broadcaster: 'pusher', key: process.env.MIX_PUSHER_PUBLIC_KEY, wsHost: process.env.VUE_APP_WEBSOCKETS_SERVER , //window.location.hostname,// cluster: process.env.MIX_PUSHER_APP_CLUSTER, wsPort: 6001, forceTLS: false, /* key: process.env.MIX_ABLY_PUBLIC_KEY, wsHost: 'realtime-pusher.ably.io', wsPort: 443, */ disableStats

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'

Error Echo is not Defined

。_饼干妹妹 提交于 2019-12-11 15:13:06
问题 I'm using pusher and have been trying to configure Laravel Echo as guided in the docs. I have added the following code to bootstrap.js import Echo from 'laravel-echo' window.Pusher = require('pusher-js'); window.Echo = new Echo({ broadcaster: 'pusher', key: '###key###', cluster: 'ap2', encrypted: true }); After compiling and running the code and I try to use Echo to subscribe to a channel, I get the console error that Echo is not defined . I suspect that when Laravel Mix (5.4) is compiling