PHP code example of mwi / laravel-forms

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

    

mwi / laravel-forms example snippets


'providers' => [
    // ...
    MWI\LaravelForms\ServiceProvider::class,
    // ...
],

'providers' => [
    // ...
    Collective\Html\HtmlServiceProvider::class,
    // ...
],

'aliases' => [
    // ...
    'Form' => Collective\Html\FormFacade::class,
    'Html' => Collective\Html\HtmlFacade::class,
    // ...
],

Form::mwitext('field_name')
Form::mwitext('field_name_two', $default_value, ['class' => 'class-name'], 'Custom Label')

// No default value with attributes
Form::mwitext('name', null, ['class' => 'class-name'])

Form::mwiradio('Set Label', 'field_name', ['option_one', 'option_two'], 'option_one', ['class' => 'class-name'])

Form::mwiselect('field_name', $options)
Form::mwiselect('field_name_two', ['this' => 'that', 'them' => 'they'], $default_value, ['class' => 'class-name'])

// No default value with attributes
Form::mwiselect('state', $options, null, ['class' => 'class-name'])
shell
php artisan vendor:publish --provider="MWI\LaravelForms\ServiceProvider"