Download the PHP package cretueusebiu/laravel-javascript without Composer
On this page you can find all versions of the php package cretueusebiu/laravel-javascript. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download cretueusebiu/laravel-javascript
More information about cretueusebiu/laravel-javascript
Files in cretueusebiu/laravel-javascript
Download cretueusebiu/laravel-javascript
More information about cretueusebiu/laravel-javascript
Files in cretueusebiu/laravel-javascript
Vendor cretueusebiu
Package laravel-javascript
Short Description Add JavaScript variables to Laravel.
License MIT
Homepage https://github.com/cretueusebiu/laravel-javascript
Package laravel-javascript
Short Description Add JavaScript variables to Laravel.
License MIT
Homepage https://github.com/cretueusebiu/laravel-javascript
Please rate this library. Is it a good library?
Informations about the package laravel-javascript
laravel-javascript
Add JavaScript variables from Laravel.
Installation
Install the package via Composer:
Next, you need to register the service provider and facade:
Usage
In your controller:
Next, in your blade view add:
Then in your JavaScript you can use:
To customize the namespace use ScriptVariables::render('custom')
.
Global Variables
You can register global variables (like the current user or csrf token) in your AppServiceProvider
:
Note that the variables must be passed via a closure.
All versions of laravel-javascript with dependencies
PHP Build Version
Package Version
The package cretueusebiu/laravel-javascript contains the following files
Loading the files please wait ....