omnicode / lara-form
Form for Laravel
Installs: 10 923
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
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
- dev-master
- 5.1.0
- 5.0.0
- 4.2.0
- 4.1.0
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.3.0
- 3.2.0
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.19
- 2.0.18
- 2.0.17
- 2.0.16
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1-beta
- 1.0.0-beta
- 0.0.34
- 0.0.33
- 0.0.32
- 0.0.31
- 0.0.30
- 0.0.29
- 0.0.28
- 0.0.27
- 0.0.26
- 0.0.25
- 0.0.24
- 0.0.23
- 0.0.22
- 0.0.21
- 0.0.20
- 0.0.19
- 0.0.18
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-dev-5.1
- dev-dev-4.2
- dev-dev-3.3
- dev-dev-5.0
- dev-dev-3.2
- dev-dev-4.1
- dev-dev-3.1
- dev-dev-4.0
- dev-dev-3.0
- dev-dev-2.0
- dev-dev-1.0
- dev-v.2.1.x
This package is auto-updated.
Last update: 2024-12-19 18:47:34 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