From 8b7e17d5871a8fbf0ac3c777e98c1ee3e7a22983 Mon Sep 17 00:00:00 2001 From: Matvii Date: Sun, 13 May 2018 00:06:41 +0300 Subject: [PATCH] commit --- readme.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/readme.md b/readme.md index 34c7e49..a8798cf 100644 --- a/readme.md +++ b/readme.md @@ -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 ```