figured/bs-forms

Bootstrap V4 style form field macros for LaravelCollective/html

Installs: 3 489

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 20

Forks: 0

Open Issues: 0

Language:HTML

0.2.0 2017-07-27 00:29 UTC

README

Custom macros for LaravelCollective/html forms to format fields for Bootstrap V4

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require figured/bs-forms.

"require": {
    "figured/bs-forms": "dev-master"
}

Next, update Composer from the Terminal:

composer update

Next, add your new provider to the providers array of config/app.php:

  'providers' => [
    // ...
    Figured\BsForms\BsFormsServiceProvider::class,
    // ...
  ],

Usage

Use the new field macros within a Form

{!! Form::open(array('url' => 'foo/bar')) !!}
	{!! Form::bsText('name') !!}
	{!! Form::bsEmail('email') !!}
	{!! Form::bsPassword('password') !!}
{!! Form::close() !!}

Attributes

Add attributes to fields with the second paramter:

{!! Form::bsText('name', [
    'placeholder' => "Name",
    'label'       => "Your Name"
    'help'        => "Enter your name"
]) !!}