Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit d1ac7d0

Browse files
author
Kerstens Maxim
authored
Update README.md
1 parent 555750f commit d1ac7d0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Vue.use(VueEcho, {
2727
* ********************************************
2828
* import Echo from 'laravel-echo';
2929
*
30-
* let EchoInstance = new Echo({
30+
* const EchoInstance = new Echo({
3131
* broadcaster: 'pusher',
3232
* key: 'PUSHER KEY',
3333
* });
@@ -40,7 +40,7 @@ Once vue-echo is registered, every vue instance is able to to subscribe to chann
4040

4141
```js
4242
var vm = new Vue({
43-
created() {
43+
mounted() {
4444
// Listen for the 'NewBlogPost' event in the 'team.1' private channel
4545
this.$echo.private('team.1').listen('NewBlogPost', (payload) => {
4646
console.log(payload);
@@ -73,7 +73,7 @@ Laravel echo allows you to subscribe to; normal, private and presence channels.
7373
In the example above we subscribed to a standard channel.
7474

7575
##### 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:`
7777

7878
```js
7979
var vm = new Vue({
@@ -91,7 +91,7 @@ var vm = new Vue({
9191

9292
##### Presence channel
9393

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:`
9595

9696
```js
9797
var vm = new Vue({
@@ -119,7 +119,7 @@ var vm = new Vue({
119119
console.log('blog post deleted', payload);
120120
}
121121
},
122-
created(){
122+
mounted(){
123123
if(window.user.role == 'admin')
124124
{
125125
this.channel.listen('BlogPostEdited', (payload) => {

0 commit comments

Comments
 (0)