omnicode / lara-form
Form for Laravel
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
Requires
- laravel/framework: 5.8.*
- omnicode/lara-support: ~5.0
Requires (Dev)
- mockery/mockery: ~0.9
- omnicode/lara-test: ~3.0
- php-mock/php-mock: ^2.0
- phpunit/phpunit: ~7.0
This package is auto-updated.
Last update: 2026-03-19 21:52:09 UTC
README
LaraForm is a Laravel Form wrapper with convenient methods, that includes Form Tampering protection and prevents double form submission.
Contents
Installation
At composer.json of your Laravel installation, add the following require line:
{
"require": {
"omnicode/lara-form": "~0.0"
}
}
Run composer update to add the package to your Laravel app.
Laravel 5.0
At config/app.php, add the Service Provider and the Facade:
'providers' => [ // ... 'LaraForm\ServiceProvider\LaraFormServiceProvider' ] //... 'aliases' => [ 'LaraForm' => 'LaraForm\Facades\LaraForm' ]
Laravel 5.1+
At config/app.php, add the Service Provider and the Facade:
'providers' => [ LaraForm\ServiceProvider\LaraFormServiceProvider::class, ] //... 'aliases' => [ 'LaraForm' => LaraForm\Facades\LaraForm::class, ]
Quick start
To create a simple form
{!! LaraForm::create($model, ['action' => route('posts.create') ]) !!}
{!! LaraForm::input('email') !!}
{!! LaraForm::submit('Submit') !!}
{!! LaraForm::end() !!}
Security
LaraForm has form tampering protection, this ensures that
- Unknown fields cannot be added to the form
- Existing fields cannot be removed from the form
- Values of hidden inputs cannot be changed
Please note, however, that it will not prevent adding new values to select dropdown or radio buttons - this information should be validated by Laravel Validations
It also prevents submitting the same form twice (server side implementation)
Helpers
Create Form
@TODO