PHP code example of jonhoo / laravel-former

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

    

jonhoo / laravel-former example snippets


$form = new Form(/* ... */);
$form->setInput(Input::all());
$validator = $form->accept();
if (!$validator->fails()) {
  $data = $validator->getData();
  // Work with $data, NOT Input::all()!
}