From 97e5a0eca961e3b2f451df2997b87976e0f29df2 Mon Sep 17 00:00:00 2001 From: Illia Sakovich Date: Fri, 27 Dec 2019 16:19:09 +0200 Subject: [PATCH] readme --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a9c4eb5..950a7b7 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,15 @@ For installation instructions and usage details, please take a look at the **[of - Include the `@shared` directive into your blade layout before all scripts. -- Share the data: +- Share the data from the Laravel: ```bash - share(['user' => $user]); + share(['user' => $user, 'title' => $title]); ``` -- Access the variable from the JavaScript: +- Access the data from the JavaScript: ```bash const user = window.sharedData.user; + const title = winwdow.sharedData.title; ``` ## 💖 Support the development