genealabs/bones-macros

Useful form macros for Laravel's Blade template engine.

Installs: 268

Dependents: 2

Stars: 1

Watchers: 1

Forks: 2

Language: PHP

0.2.33 2015-02-05 21:36 UTC

README

Build Status Latest Stable Version Latest Unstable Version License

Installation

To install bones-flash as a stand-alone module:

composer require "genealabs/bones-macros":"*"

or add it to you composer.json file:

    "require": {
        /* ... */,
        "genealabs/bones-macros": "*"
    },
    /* ... */

And then add the service provider to your app.php config file:

    // 'providers' => array(
        'GeneaLabs\BonesMacros\BonesMacrosServiceProvider',
    // );

Usage

These HTML and FORM macros are intended to be used mainly in Blade tempaltes to reduce tedium.

Methods

The following methods are available to use:

// provides a Bootstrap-compatible cancel button that will take you to the previous page.
{{ Form::cancelButton() }}

// provides a select list with a range of intervals
{{ Form::selectRangeWithInterval($name, $start, $end, $interval, $default = null, $attributes = []) }}

// provides ability to slugify any text
{{ HTML::slugify($text) }}

Dependencies

At this time this package requires:

  • Laravel 4.2+
  • Bootstrap 3.1+