Download the PHP package kris/laravel4-form-builder without Composer
On this page you can find all versions of the php package kris/laravel4-form-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kris/laravel4-form-builder
More information about kris/laravel4-form-builder
Files in kris/laravel4-form-builder
Package laravel4-form-builder
Short Description Laravel form builder - symfony like
License MIT
Informations about the package laravel4-form-builder
Laravel 4 form builder
Form builder for Laravel 4 inspired by Symfony's form builder. With help of Laravels FormBuilder class creates forms that can be easy modified and reused. By default it supports Bootstrap 3.
Laravel 5
For laravel 5 version check laravel-form-builder
Documentation
For detailed documentation refer to http://kristijanhusak.github.io/laravel-form-builder/.
Note There are small differences between version 4 and 5 (Configuration path, etc.), so please be aware of those.
Changelog
Changelog can be found here
Installation
run composer update
Then add Service provider to config/app.php
And Facade (also in config/app.php
)
Quick start
Creating form classes is easy. Lets assume PSR-4 is set for loading namespace App
in app/Project
folder. With a simple artisan command we can create form:
Form is created in path app/Project/Forms/SongForm.php
with content:
If you want to instantiate empty form without any fields, just skip passing --fields
parameter:
Gives:
After that instantiate the class in the controller and pass it to view:
Print the form in view with form()
helper function:
Above code will generate this html:
Contributing
Project follows PSR-2 standard and it's covered with PHPUnit tests. Pull requests should include tests and pass Travis CI build.
To run tests first install dependencies with composer install
.
After that tests can be run with vendor/bin/phpunit