2017 © Pedro Peláez
 

library ui-kit-laravel

Laravel driver for almeida/ui-kit

image

almeida/ui-kit-laravel

Laravel driver for almeida/ui-kit

  • Friday, January 30, 2015
  • by almeida
  • Repository
  • 2 Watchers
  • 4 Stars
  • 3,079 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

UIKit Laravel

Just a Laravel driver to get UIKit working., (*1)

Super alpha release. Suggestions welcome, (*2)

Installation via Composer

Add UIKit to your composer.json file to require UIKit, (*3)

require : {
    "almeida/ui-kit-laravel" : "dev-master"
}

Now update Composer, (*4)

composer update

The last required step is to add the service provider to app/config/app.php, (*5)

    'Almeida\UIKitLaravel\UIKitLaravelServiceProvider',

UIKit should now be avaliable in your application., (*6)

You can access the UIKit through the static interface you are used to with Laravel components., (*7)

    UIKit::header('Some heading');

Todo

  • [ ] Write up how to
  • [ ] Examples
  • [ ] Write tests

How to :

Tables

!! Dangerzone !!! - Probably going to seperate Pagination from Tables soon, (*8)

  • Probably going to render the table directly from UIKit::table($rows, $options)

``` php, (*9)

// 1.0 - Make sure data is transformed for output

    // Elquoent collection, Paginator
    $data;

    // Format data for presentation to give us...
    $rows = array(
        array(
            'id' => 1,
            'name' => 'John Doe',
            'gender' => 'Male',
        ),
        array(
            'id' => 2,
            'name' => 'Jane Doe',
            'gender' => 'Female',
        ),
    );

// 2.0 - Configure how you want the table to behave
$options = array(
    // @todo - What do we display when there is no data
    'behaviours' => array(
        'no-data' => array(
            'icon' => 'User',
            'message' => "No users found",
            'subtext' => array(
                'label' => 'Create a new User',
                'url' => '/admin/users/create'
            ),
        )
    ),
    // Add's a sort link <th><a>
    // match on keys
    'sort' => array(
        'name'   => 'name',
        'gender'    => 'gender',
    ),
    // Pass in query manually for now.
    // Its a bit tricky to autodetect framework and use relevant env objects
    'query' => Request::query()
);

// 3.0 - Build the table
$table = UIKit::table($rows, $options);

// 4.0 -  Render the table
echo $table->render();

// 5.0 - (Optional) Print pagination
$pagination = $table->pagination($data, $options);

#### Forms ##### Extend the FormBuilder to render Twitter Bootstrap inputs and buttons ```php 'Almeida\UIKitLaravel\HtmlServiceProvider',

No need to change any markup. The items below will all render with the correct bootstrap markup., (*10)


{{ Form::text() }} {{ Form::checkbox() }} {{ Form::radio() }} {{ Form::submit() }}

Add emphasis to your buttons, (*11)


{{ Form::submit('Delete', ['feedback' => 'danger']) }}

Multiple checkboxes, (*12)

    {{ Form::mutiple('roles', $list=[], $selected=[], $options=[]) }}

The Versions

30/01 2015

dev-master

9999999-dev https://github.com/arnold-almeida/UIKit-Laravel

Laravel driver for almeida/ui-kit

  Sources   Download

MIT

The Requires

 

laravel frontend generators ui-kit

28/03 2014

0.1.0

0.1.0.0 https://github.com/xxxx

Laravel implemention for almeida/ui-kit

  Sources   Download

MIT

The Requires

 

laravel frontend generators ui-kit