2017 © Pedro Peláez
 

library laravel-forms

A form wrapper for laravel, implemented with bootstrap fields

image

lawma/laravel-forms

A form wrapper for laravel, implemented with bootstrap fields

  • Tuesday, November 7, 2017
  • by rolandMbasa
  • Repository
  • 0 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel-Forms

Laravel-Forms is a laravel library that generates front end forms with fields, errors ,crsf_tokens,actions, method_fields using laravel's expressive syntax, (*1)

Laravel-Forms is heavily inspired by Laravels Migrations Schemer Builder (Illuminate\Database\Schema\Builder), (*2)

Laravel-Forms requires laravel >= 5.5., (*3)

Table of Contents

Installation

composer require lawma/larevel-forms

Basic Usage

The great Laravel auto discovery package will register for you both the service provider and the Facade after installation., (*4)

Use Form facade in your blade views to generate the form fields, (*5)

    {{
        Form::fields(function($form){
           $form->textField()->label("Clients Name")->name("name")
           $form->numberField()->label("AccountBalance")->name("accountBalance")->step(0.5);
           $form->button()->text('Create Client')->icon('fa fa-user');
        })->action(route("clients.store"))->method("POST")
    }}
  • Basically the form has most of the field types the would expect namely;
    • $form->textField()
    • $form->numberField()
    • $form->emailField()
    • $form->numberField()
    • $form->passwordField() Every field extends the base field Lawma\Forms\Field and has access to setters like the field name, field type.

Setting Models On Forms

You can set the model on a form, this can be useful when editing records $form->model($user) You can as well as set the model on a specific field in rare circumstances where the form is using multiple fields $form->textField()->model($user)->name('name'), (*6)

Customizing Views

Out of the box , Laravel-Forms uses bootstrap 4 form fields, but you can publish them and customize them in which ever you want, (*7)

  • ## Todo
    • Complete The readme
    • Complete The docs

License

Laravel-forms is released under the MIT Licence, (*8)

The Versions

07/11 2017

dev-master

9999999-dev

A form wrapper for laravel, implemented with bootstrap fields

  Sources   Download

MIT

The Requires

 

by Ahimbisibwe Roland