Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omnicode/lara-form
Laravel Forms with Form-Tampering protection
https://github.com/omnicode/lara-form
form laravel security tampering
Last synced: about 2 months ago
JSON representation
Laravel Forms with Form-Tampering protection
- Host: GitHub
- URL: https://github.com/omnicode/lara-form
- Owner: omnicode
- License: mit
- Created: 2017-08-12T12:04:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-19T06:40:08.000Z (about 5 years ago)
- Last Synced: 2024-10-11T01:19:39.575Z (3 months ago)
- Topics: form, laravel, security, tampering
- Language: PHP
- Homepage:
- Size: 349 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Lara Form - Laravel Form Package with Form Tampering protection
LaraForm is a Laravel Form wrapper with convenient methods, that includes **Form Tampering protection** and prevents double form submission.
## Contents
2. Installation
3. Quick start
3. Security
4. Helpers
* Create Form
* Text Input
* Textarea
* Select
* Checkbox
* Radio Buttons
* Hidden
* Password
* close
* buttons
5. LicenseAt `composer.json` of your Laravel installation, add the following require line:
``` json
{
"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:
```php
'providers' => [
// ...
'LaraForm\ServiceProvider\LaraFormServiceProvider'
]//...
'aliases' => [
'LaraForm' => 'LaraForm\Facades\LaraForm'
]
```### Laravel 5.1+
At `config/app.php`, add the Service Provider and the Facade:
```php
'providers' => [
LaraForm\ServiceProvider\LaraFormServiceProvider::class,
]//...
'aliases' => [
'LaraForm' => LaraForm\Facades\LaraForm::class,
]
```To create a simple form
```php
{!! LaraForm::create($model, ['action' => route('posts.create') ]) !!}
{!! LaraForm::input('email') !!}{!! LaraForm::submit('Submit') !!}
{!! LaraForm::end() !!}
```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 changedPlease 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)
@TODO