@@ -27,7 +27,7 @@ Vue.use(VueEcho, {
27
27
* ********************************************
28
28
* import Echo from 'laravel-echo';
29
29
*
30
- * let EchoInstance = new Echo({
30
+ * const EchoInstance = new Echo({
31
31
* broadcaster: 'pusher',
32
32
* key: 'PUSHER KEY',
33
33
* });
@@ -40,7 +40,7 @@ Once vue-echo is registered, every vue instance is able to to subscribe to chann
40
40
41
41
``` js
42
42
var vm = new Vue ({
43
- created () {
43
+ mounted () {
44
44
// Listen for the 'NewBlogPost' event in the 'team.1' private channel
45
45
this .$echo .private (' team.1' ).listen (' NewBlogPost' , (payload ) => {
46
46
console .log (payload);
@@ -73,7 +73,7 @@ Laravel echo allows you to subscribe to; normal, private and presence channels.
73
73
In the example above we subscribed to a standard channel.
74
74
75
75
##### Private channel
76
- If you would like to subscribe to private channel instead, prefix your channel name with ` private ` :
76
+ If you would like to subscribe to private channel instead, prefix your channel name with ` private: `
77
77
78
78
``` js
79
79
var vm = new Vue ({
@@ -91,7 +91,7 @@ var vm = new Vue({
91
91
92
92
##### Presence channel
93
93
94
- If you would like to subscribe to presence channel instead, prefix your channel name with ` presence ` :
94
+ If you would like to subscribe to presence channel instead, prefix your channel name with ` presence: `
95
95
96
96
``` js
97
97
var vm = new Vue ({
@@ -119,7 +119,7 @@ var vm = new Vue({
119
119
console .log (' blog post deleted' , payload);
120
120
}
121
121
},
122
- created (){
122
+ mounted (){
123
123
if (window .user .role == ' admin' )
124
124
{
125
125
this .channel .listen (' BlogPostEdited' , (payload ) => {
0 commit comments