Package Data | |
---|---|
Maintainer Username: | graciano |
Maintainer Contact: | graciano.dev@gmail.com (Matheus Graciano) |
Package Create Date: | 2015-11-25 |
Package Last Update: | 2017-03-03 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:14:14 |
Package Statistics | |
---|---|
Total Downloads: | 124 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Helpers for laravel blade template inputs. Tested in laravel 5.2, 5.3 and 5.4
<input type="text" name='name' value="{{ input_value($obj, 'name') }}" />
<!-- this will call $obj->{name} for the value, if none is found (or the obj is null), old('name') will be displayed -->
Or, if you have a checkbox:
<input type="checlbox" name='accept' {{ input_checked($obj, 'accepted') }} />
<!-- this will print checked if the obj->accepted (or the old input) is anything but false/null -->
First, require the project with composer: $ composer require graciano/blade-helpers
Add the file in your composer.json files section, like this:
"autoload": {
"files":[
"vendor/graciano/blade-helpers/src/helpers.php"
],
}
Then, composer dumpautoload
This project is open-sourced software licensed under the MIT license