| Package Data | |
|---|---|
| Maintainer Username: | mraiur | 
| Maintainer Contact: | mraiur@gmail.com (Nikolai Ivanov) | 
| Package Create Date: | 2015-02-15 | 
| Package Last Update: | 2015-03-21 | 
| Language: | PHP | 
| License: | MIT | 
| Last Refreshed: | 2025-10-26 03:12:59 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 48 | 
| Monthly Downloads: | 0 | 
| Daily Downloads: | 0 | 
| Total Stars: | 0 | 
| Total Watchers: | 1 | 
| Total Forks: | 0 | 
| Total Open Issues: | 0 | 
Extend Laravel forms to add convinient access and helps. The package is extending the Laravels Html/From package to add additional functionality.
{!! Form::ariaSelect('test', [
    ['id' => 0, 'label' => '---++---', 'role' => 'test', 'selected'=>'selected'],
    ['id' => 1, 'label' => 'title->a', 'role' => 'test'],
    ['id' => 2, 'label' => 'title->b', 'role' => 'admi', 'penka' => '1']
], null, [
    'option' => [
        'displayField'=> 'label',
        'valueField' => 'id',
        'aria' => 'role,id'
    ]
, 'placeholder' => 'placeholder text', 'custom-data' => 1, 'aria' => 'custom-data']) !!}
Output:
<select placeholder="placeholder text" data-custom-data="1" name="test">
    <option value="0" data-id="0" data-role="test">---++---</option>
    <option value="1" data-id="1" data-role="test">title->a</option>
    <option value="2" data-id="2" data-role="admi">title->b</option>
</select>
{!! Form::aria(['aria' => 'role,myid', 'name' => 'testName'], [
    'value' => 'TEST',
    'role' => "admin",
    'myid' => 1
]) !!}
Output:
<input name="testName" type="hidden" value="TEST" data-role="admin" data-myid="1">
Setting the aria value to a comma separated list will add the matching Model attributes.
After install add to your app.php in providers array:
'Illuminate\Html\HtmlServiceProvider',
"Mraiur\EnhancedForm\FormServiceProvider"
Add to aliases array:
'Form'=> 'Illuminate\Html\FormFacade', 
'HTML'=> 'Illuminate\Html\HtmlFacade'