Download the PHP package exolnet/laravel-vue-data without Composer
On this page you can find all versions of the php package exolnet/laravel-vue-data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download exolnet/laravel-vue-data
More information about exolnet/laravel-vue-data
Files in exolnet/laravel-vue-data
Package laravel-vue-data
Short Description Adds utilities to easily pass data from Laravel to Vue.
License MIT
Homepage https://github.com/eXolnet/laravel-vue-data
Informations about the package laravel-vue-data
laravel-vue-data
Adds utilities to easily pass data from Laravel to Vue.
Installation
Require this package with composer:
If you don't use package auto-discovery, add the service provider to the providers
array in config/app.php
:
And the facade to the facades
array in config/app.php
:
Usage
Define variables
First, you need to devine variable that will be available in your Vue application.
In your PHP code:
In a Blade view:
Make variables available
In your base layout, add the following view before your main app.js
to make the variables available:
Use variables
In your app.js
, use the variables defined when they are available:
Testing
To run the phpUnit tests, please use:
Contributing
Please see CODE OF CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Alexandre D’Eschambeault
- All Contributors
License
This code is licensed under the MIT license. Please see the license file for more information.