milon / blade-variable
Declaring variable in blade file
Fund package maintenance!
milon
paypal.me/tomilon
Installs: 147
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 3
Forks: 2
Open Issues: 0
Type:package
Requires
- php: >=5.5.9
- illuminate/support: 5.*
This package is auto-updated.
Last update: 2024-10-14 12:12:05 UTC
README
blade-variable
Declaring variables in Laravel blade files.
Installation
Add this line to composer.json
file-
require: {
...,
"milon/laravel-blade": "~5.2"
}
For Laravel 5.1 try these lines instead-
require: {
...,
"milon/laravel-blade": "~5.1"
}
Then from your terminal run this command-
composer update
After that add this line to providers
array on config/app.php
file-
'providers' => [
...,
Milon\BladeVariable\BladeVariableServiceProvider::class,
]
Usage
You can define any variable in blade file like this-
@var('name', 'value')
Then you can use this like any other normal php variable-
{{ $name }}
Copyright
Nuruzzaman Milon
http://milon.im