1. Go to this page and download the library: Download uspdev/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/ */
uspdev / forms example snippets
[
'key' => 'uspdev-forms',
],
use Uspdev\Forms\Forms;
$form = new Form($key = null, ['action' => route('sua-rota-do-action')]);
$formHtml = $form->generateHtml('contact_form'); // conforme definido em $form
// ....
public function store(Request $request)
{
$form = (new Form())->handleSubmission($request);
// ....
}
$allSubmissions = $form->listSubmission();
// Ou
$allFormNameSubmissions = $form->listSubmission('form-name');