PHP code example of bewarhizirvan / laravel-form

1. Go to this page and download the library: Download bewarhizirvan/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/ */

    

bewarhizirvan / laravel-form example snippets


$form->addText($name = null, $value = '', $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])  
$form->addFile($name = null, $value = '', $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])  
$form->addButton($label = '', $attributes = [])  
$form->addHidden($name = null, $value = '', $attributes = [])  
$form->addSelect($name= null, $options = [], $value='',$attributes = [],$label=null, $label_attributes = [], $div_attributes = [])  
$form->addTextArea($name = null, $value = '', $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])  
$form->addCheckbox($name = null, $value = 1, $checked = false, $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])  
$form->addCheckboxGroup($name = null, $checkboxes = [], $checked_list = [], $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])  
$form->addRadioGroup($name = null, $radios = [], $checked = '', $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])  
$form->addTable($label = '', $table_data = [], $label_attributes = [], $table_attributes = [], $thead_attributes = [], $tbody_attributes = [], $tfoot_attributes = [], $div_attributes = [])

$table_data = [
'names' => [],
'inputs' => [],
'sums' => [],
'buttons' => [],
];

$form = $form->render();

$form = new \BewarHizirvan\LaravelForm\LaravelForm($parameters);
$form->addText('email');
$form->addText('name');
$form->addText('password', '', ['type' => 'password']);
$form = $form ->render();

\BewarHizirvan\LaravelForm\LaravelForm::redirect($route = '/');
 php
$form = new \BewarHizirvan\LaravelForm\LaravelForm($parameters);