PHP code example of webup / laravel-form

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

    

webup / laravel-form example snippets

 php
'providers' => [
    //...
    Webup\LaravelForm\FormServiceProvider::class
]
 php
'aliases' => [
    //...
    'Form'      => Webup\LaravelForm\Facades\Form::class,
]

 php artisan vendor:publish
 php
{!! Form::create('select', 'fruits')
    ->label("Fruits")
    ->placeholder("What's your favorite?")
    ->addOptions(['apple' => 'Apple', 'strawberry' => 'Strawberry', 'melon' => 'Melon'])
    ->value('apple') !!}
 php
{!! Form::create('checkbox', 'cgu')
    ->label("I accept the general terms and conditions")
    ->value(true) !!}
 php
{!! Form::honeypot("unicorn_mail") !!}
 php
$request->validate([
    [...]
    'unicorn_mail' => 'honeypot',
]);
 php
{!! Form::timetrap("unicorn_time") !!}
 php
$request->validate([
    [...]
    'unicorn_time' => 'timetrap:2',
]);