Package Data | |
---|---|
Maintainer Username: | msamec |
Maintainer Contact: | marko.samec@am2studio.hr (Marko Šamec) |
Package Create Date: | 2016-03-12 |
Package Last Update: | 2017-12-06 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-16 15:03:09 |
Package Statistics | |
---|---|
Total Downloads: | 4,989 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 12 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Via Composer
$ composer require am2studio/laravel-admin-form
Register service provider in your app.php
AM2Studio\LaravelAdminForm\AdminFormServiceProvider::class,
Register the facade in your app.php
'AdminForm' => AM2Studio\LaravelAdminForm\AdminFormFacade::class,
You can use default templates or if you want to use your own templates you can publish views and edit them
php artisan vendor:publish --provider="AM2Studio\LaravelAdminForm\AdminFormServiceProvider" --tag=views
Inside template:
{!! AdminForm::text($name, $value, $options) !!}
the list of helpers:
{!! AdminForm::text() !}}
{!! AdminForm::number() !}}
{!! AdminForm::radio() !}}
{!! AdminForm::password() !}}
{!! AdminForm::textarea() !}}
{!! AdminForm::select() !}}
{!! AdminForm::date() !}}
{!! AdminForm::checkbox() !}}
{!! AdminForm::submit() !}}
they all accept same parameters as Form::
helpers
There is another helper method
{!! AdminForm::row($label, $adminFormElement) !!}
example
{!! AdminForm::row(trans('ui.first_name'), AdminForm::text('first_name', $user->first_name)) !!}
this will render into
<tr>
<td>First Name</td>
<td>
<div class="card-form">
<fieldset class="no-inline-edit">
<input placeholder="Enter first name here" name="first_name" type="text" value="Am2">
<button data-js="submit-field" type="submit"><i class="fa fa-check"></i></button>
<i class="fieldset-overlay" data-js="focus-on-field"></i>
</fieldset>
</div>
</td>
</tr>
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING and CONDUCT for details.
The MIT License (MIT). Please see License File for more information.