Getting Started
Backend Installation
Install FormForge in Laravel and ship your first server-side form flow.
Requirements
- PHP
>=8.2 - Laravel
12.xor13.x - For Laravel
13.x, PHP>=8.3is required by Laravel itself.
Install and migrate
Terminal
composer require evanschleret/formforge
php artisan formforge:install
php artisan migrate
For safe upgrades of existing installations:
Terminal
php artisan formforge:install:merge --dry-run
php artisan formforge:install:merge
php artisan migrate
Define your first form
<?php
declare(strict_types=1);
use EvanSchleret\FormForge\Facades\Form;
Form::define('contact')
->title('Contact')
->version('1')
->category('contact')
->text('name')->required()->max(120)
->email('email')->required()
->textarea('message')->required();
Form::sync();
Submit from PHP
<?php
declare(strict_types=1);
use EvanSchleret\FormForge\Facades\Form;
$form = Form::get('contact');
$submission = $form->submit([
'name' => 'Evan',
'email' => 'evan@example.com',
'message' => 'Hello'
]);
At this point, the package is fully usable without exposing any FormForge HTTP route.