app.js回聲腳本:我使用的推進器在Laravel 5.4,但我得到以下錯誤:
Echo:join('chatroom')
.listen('MessagePosted', (e) => {
this.messages.push({
message: e.message.message,
user: e.user
});
});
收到以下錯誤:
app.js:37859 [Vue warn]: Error in created hook: "ReferenceError: join is not defined"
(found in)warn @ app.js:37859handleError @ app.js:37944callHook @ app.js:39983Vue._init @ app.js:41425Vue$3 @ app.js:41520(anonymous function) @ app.js:1127__webpack_require__ @ app.js:20(anonymous function) @ app.js:47150__webpack_require__ @ app.js:20(anonymous function) @ app.js:66(anonymous function) @ app.js:69 app.js:37948 ReferenceError: join is not defined(…)handleError @ app.js:37948callHook @ app.js:39983Vue._init @ app.js:41425Vue$3 @ app.js:41520(anonymous function) @ app.js:1127__webpack_require__ @ app.js:20(anonymous function) @ app.js:47150__webpack_require__ @ app.js:20(anonymous function) @ app.js:66(anonymous function) @ app.js:69 app.js:45006 Download the Vue Devtools extension for a better development experience:
的':''中的回聲:join'看起來無效。你的意思是'Echo.join'?根據Laravel文檔,'join'是'Echo'對象的一種方法。 – jameshfisher
[Laravel 5.4推送器錯誤]的可能重複(https://stackoverflow.com/questions/44960405/laravel-5-4-pusher-error) – Amy