PHP code example of intentor / laravel-form
1. Go to this page and download the library: Download intentor/laravel-form library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
intentor / laravel-form example snippets
'providers' => [
'Intentor\LaravelForm\ServiceProvider',
]
//...
'aliases' => [
'Form' => 'Intentor\LaravelForm\Facade'
]
'providers' => [
Intentor\LaravelForm\ServiceProvider::class,
]
//...
'aliases' => [
'Form' => Intentor\LaravelForm\Facade::class,
]
@form_open(action('SomeController@action'))
@form_close
{!! Form::open(action('SomeController@action')) !!}
{!! Form::close() !!}
@form_open(action('SomeController@action'))
@form_text('name', 'Name')
@form_buttons('Send', 'Reset')
@form_close
{!! Form::open(action('SomeController@action')) !!}
{!! Form::text('name', 'Name') !!}
{!! Form::buttons('Send', 'Reset') !!}
{!! Form::close() !!}
@form_open($url, $method = 'POST', $theme = null, $
{!! Form::open($url, $method = 'POST', $theme = null, $
@form_
{!! Form::model($model, $url, $method = 'POST', $theme = null, $
@form_close
{!! Form::close() !!}
@form_label($text, $field = null, $attributes = [])
{!! Form::label($text, $field = null, $attributes = []) !!}
@form_readonly($label, $text, $attributes = [])
{!! Form::readonly($label, $text, $attributes = []) !!}
@form_hidden($name, $value = null, $attributes = [])
{!! Form::hidden($name, $value = null, $attributes = []) !!}
@form_text($name, $label = null, $attributes = [])
{!! Form::text($name, $label = null, $attributes = []) !!}
@form_textarea($name, $label = null, $attributes = [])
{!! Form::textarea($name, $label = null, $attributes = []) !!}
@form_email($name, $label = null, $attributes = [])
{!! Form::email($name, $label = null, $attributes = []) !!}
@form_url($name, $label = null, $attributes = [])
{!! Form::url($name, $label = null, $attributes = []) !!}
@form_number($name, $label = null, $min = 0, $max = 9999, $step = 1, $attributes = [])
{!! Form::number($name, $label = null, $min = 0, $max = 9999, $step = 1, $attributes = []) !!}
@form_password($name, $label = null, $attributes = [])
{!! Form::password($name, $label = null, $attributes = []) !!}
@form_checkbox($name, $label = null, $value = 1, $attributes = [])
{!! Form::checkbox($name, $label = null, $value = 1, $attributes = []) !!}
@form_radio($name, $label = null, $attributes = [])
{!! Form::radio($name, $label = null, $attributes = []) !!}
@form_checkbox_group($name, $label = null, $list = [], $selected = [], $attributes = [])
{!! Form::checkboxGroup($name, $label = null, $list = [], $selected = [], $attributes = []) !!}
@form_radio_group($name, $label = null, $list = [], $selected = null, $attributes = [])
{!! Form::radioGroup($name, $label = null, $list = [], $selected = null, $attributes = []) !!}
@form_dropdown($name, $label = null, $list = [], $empty = null, $selected = null, $attributes = [])
{!! Form::dropdown($name, $label = null, $list = [], $empty = null, $selected = null, $attributes = []) !!}
@form_submit($label)
{!! Form::submit($label) !!}
@form_reset($label)
{!! Form::reset($label) !!}
@form_buttons($submitLabel, $resetLabel = null)
{!! Form::buttons($submitLabel, $resetLabel = null) !!}
Form::modelToList($model, $valueField, $textField)
Form::modelToSelected($model, $valueField)