https://github.com/stekel/laravel-blade-directives
A personal collection of blade directives
https://github.com/stekel/laravel-blade-directives
blade-directives laravel
Last synced: about 2 months ago
JSON representation
A personal collection of blade directives
- Host: GitHub
- URL: https://github.com/stekel/laravel-blade-directives
- Owner: stekel
- License: mit
- Created: 2018-06-21T20:35:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T19:38:35.000Z (over 3 years ago)
- Last Synced: 2025-07-22T16:06:47.865Z (11 months ago)
- Topics: blade-directives, laravel
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Blade Directives
A personal collection of Laravel blade directives.
## Install
Via Composer
``` bash
$ composer require stekel/laravel-blade-directives
```
## Directives
| Function | Description |
| ------------- | ------------- |
| `@inputValue($model, $attribute)` | Displays form input value, either from the given `$model->$attribute` or from the value of `old($attribute)` |
| `@optionValue($model, $attribute, $default)` | Sets the select option to "selected", either from the given `$model->$attribute` or from the value of `old($attribute)` |
| `@checkboxValue($model, $attribute)` | Sets the checkbox to "checked", either from the given `$model->$attribute` or from the value of `old($attribute)` |
| `@checkboxValueFromArray($model, $attribute, $array)` | Sets the checkbox to "checked", if `$array` contains either `$model->id` or `old($attribute)` |