Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Illia Sakovich committed Dec 27, 2019
1 parent 1c70517 commit 97e5a0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97e5a0e

Please sign in to comment.