We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent caf4739 commit 7ced7b5Copy full SHA for 7ced7b5
README.md
@@ -0,0 +1,38 @@
1
+JavaScript-Variables
2
+============
3
+Sent variables into JavaScript. Can be used standalone or with a Laravel service provider.
4
+
5
+### Installation
6
+Add to your composer.json file
7
+```json
8
+"dowilcox/knp-menu-laravel": "dev-master"
9
+```
10
11
+```php
12
+$jsVar = new Dowilcox\JsVar\JsVar('namespace');
13
14
15
+### Installation (Laravel)
16
17
+In config/app.php add the service provider and alias.
18
19
20
+'Dowilcox\JsVar\JsVarServiceProvider',
21
22
23
24
+'Menu' => 'Dowilcox\JsVar\Facades\JsVar',
25
26
27
+### Example
28
29
30
+$jsVar->add('key', 'value');
31
32
+echo $jsVar->dump();
33
34
35
+Will output:
36
+```javascript
37
+window.namespace = window.namespace || {key: 'value'};
38
0 commit comments