ckdot / laravel-foundation-forms by ckdot
forked from manavo/laravel-bootstrap-forms

Reduce the boilerplate code required to get forms in Laravel to have Foundation styling
959
0
1
Package Data
Maintainer Username: ckdot
Maintainer Contact: christian.kilb@live.com (Christian Kilb)
Package Create Date: 2015-07-19
Package Last Update: 2016-02-17
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2025-05-03 15:07:32
Package Statistics
Total Downloads: 959
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 2
Total Open Issues: 0

Laravel Bootstrap Forms

Create Foundation forms in Laravel in no time. You can find the original article here: http://blog.stidges.com/post/easy-bootstrap-forms-in-laravel

Install

composer require ckdot/laravel-foundation-forms:~0.1

Configure

Make sure you comment out the existing HtmlServiceProvider (Illuminate\Html\HtmlServiceProvider):

<?php
// File (Laravel 5): config/app.php

return array(
    // ...
    'providers' => array(
        // ...
        //Illuminate\Html\HtmlServiceProvider::class,
        Ckdot\FoundationForms\FoundationFormsServiceProvider::class,
        // ...
    ),
    // ...
);

No change is necessary for the Form Facade.

Example

{{ Form::open([ 'route' => 'posts.store' ]) }}

    {{ Form::openGroup('title', 'Title') }}
        {{ Form::text('title') }}
    {{ Form::closeGroup() }}

    {{ Form::openGroup('status', 'Status') }}
        {{ Form::select('status', $statusOptions) }}
    {{ Form::closeGroup() }}

{{ Form::close() }}