Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MatviiB authored May 12, 2018
1 parent e3f0ef0 commit 8b7e17d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,11 @@ Also you can run `php artisan notifier:init show` - this command will show you l

### Usage

At first you need to add `@include('notifier::connect')` before you'll use `socket.addEventListener()` to your view or main layout to use on the ALL pages.
At first you need to add `@include('notifier::connect')` before you'll use `socket.addEventListener()` to your view or main layout to use it with ALL pages.

Anywhere in your application add next event to send data to array of NAMED ROUTES. Example:
Anywhere in your application add next event:

`event(new Notify($data, ['chart', 'index']));`

Event WITHOUT array of routes will send data to EACH page which are listen the sockets. Example:

`event(new Notify($data));`

Event with urls instead of named routes WILL NOT WORK.
`event(new Notify($data, ['some-route-name']));`

On front-end part add event listener
```
Expand Down

0 comments on commit 8b7e17d

Please sign in to comment.