jonhoo / laravel-former by Jonhoo

Laravel form library
36
2
3
Package Data
Maintainer Username: Jonhoo
Package Create Date: 2013-06-06
Package Last Update: 2014-05-02
Language: PHP
License: MIT
Last Refreshed: 2024-04-18 03:05:16
Package Statistics
Total Downloads: 36
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Former

Former is a form library for Laravel that provides HTML5 form field types, validation and various other convenient luxuries for modern app development.

Build status: Build Status

Notes on usage until examples are in place

Former will validate all data that is passed to it, but will not change the array that is given to it. To avoid mass-assignment attacks and such, use

$form = new Form(/* ... */);
$form->setInput(Input::all());
$validator = $form->accept();
if (!$validator->fails()) {
  $data = $validator->getData();
  // Work with $data, NOT Input::all()!
}

Installing

  • Install Composer and place the executable somewhere in your $PATH (for the rest of this README, I'll reference it as just composer)

  • Add jonhoo/former to your project's `composer.json:

{
    "require": {
        "jonhoo/former": "0.*"
    }
}
  • Install/update your dependencies
$ cd my_project
$ composer install

And you're good to go! Have a look at the example files in examples/ to see how you might go about using Former.