2017 © Pedro Peláez
 

library table-builder

A simple table builder

image

gloudemans/table-builder

A simple table builder

  • Wednesday, March 5, 2014
  • by Crinsane
  • Repository
  • 1 Watchers
  • 3 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 20 % Grown

The README.md

TableBuilder

A simple table builder implementation. Build tables from from data. Accepted data is an array of:, (*1)

  • Arrays
  • Objects
  • Collections (Laravel Specific)

Installation

Install the package through Composer. Edit your project's composer.json file by adding:, (*2)

"require": {
    "gloudemans/tablebuilder": "dev-master"
}

Next, run the Composer update command from the Terminal:, (*3)

composer update

Laravel

If you want to use this package in your Laravel application all you have to do is add the service provider of the package and alias the package. To do this open your app/config/app.php file., (*4)

Add a new line to the service providers array:, (*5)

'Gloudemans\TableBuilder\TableBuilderServiceProvider'

And finally add a new line to the aliases array:, (*6)

'Table'            => 'Gloudemans\TableBuilder\Facades\Table',

Now you're ready to start using the table builder in your application., (*7)

Usage

Currently the package has only one public method, generate(). This method takes one mandatory and two optional arguments., (*8)

$builder->generate($data);                        // Generates a table with the specified data, headers will be the values keys of the data
$builder->generate($data, $attributes);           // Adds attributes to the `<table>` tag. (class, id, etc.)
$builder->generate($data, $attributes, $headers); // Gives you the ability to specify the headers yourself.

The Versions

05/03 2014

dev-master

9999999-dev

A simple table builder

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rob Gloudemans

html table builder