wdda / laravel-uikit-form
This package for render form as uikit
Installs: 1 265
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 2
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: >=6.5.5
This package is auto-updated.
Last update: 2025-02-17 08:59:25 UTC
README
Small and smart package for generate html form elements as Uikit mark!
Example
Input:
{!! formInput('my_name')->value('value 123')->class('uk-input') !!}
Result:
<div class="uk-margin-small-bottom"> <label @if($id)for="{{ $id }}"@endif>{{ $label }}</label> <div class="uk-form-controls"> <input @if(!$class)class="uk-input" @endif @if($id)id="{{ $id }}" @endif @if($name)name="{{ $name }}" @endif value="{{ $value }}"{!! $attributes !!}> </div> </div>
formInput('Input') ->label('Input') ->id('id') ->class('uk-input') ->attributes(['attribute1', 'attribute2' => 'value']) ->value('value')
formTextarea('Textarea') ->label('Textarea') ->id('id') ->class('uk-input') ->attributes(['attribute1', 'attribute2' => 'value']) ->value('value') ->rows(8)
formSelect('Select') ->label('Select') ->id('id') ->class('uk-input') ->attributes(['attribute1', 'attribute2' => 'value']) ->value('value')
formCheckbox('Checkbox') ->label('Checkbox') ->id('id') ->class('uk-input') ->attributes(['attribute1', 'attribute2' => 'value']) ->value('value')
formRadio('Radio') ->label('Radio') ->id('id') ->class('uk-input') ->attributes(['attribute1', 'attribute2' => 'value']) ->value('value')
Install
Install package:
$ composer require wdda/laravel-uikit-form
Update package
$ composer update wdda/laravel-uikit-form
Open your config/app.php and add the following to the providers array:
WDDA\LaravelUikitForm\LaravelUikitFormProvider::class,
Security
If you discover any security related issues, please email dima@wdda.pro instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.