Git Product home page Git Product logo

lara-form's Introduction

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

  1. Installation
  2. Quick start
  3. Security
  4. Helpers
  5. License

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

lara-form's People

Contributors

davitbek avatar tig3 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

gevor701069

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.