nsbucky / resulttable by zainengineer

Table creator for Laravel 4.2 projects
Package Data
Maintainer Username: zainengineer
Maintainer Contact: nsbucky@gmail.com (Kenrick Buchanan)
Package Create Date: 2015-03-16
Package Last Update: 2015-03-17
Language: PHP
License: MIT
Last Refreshed: 2020-08-09 15:01:44
Package Statistics
Total Downloads: 6
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0


Inspired by Yii's CGridView, this Laravel 4.2 dependent class strives to be a simple way to generate a table from an array, ie; a database result set. It works off of an array of arrays, or an array of objects. You decide which array columns or object properties to display. It does not rewrite queries or handle paging, that is up to you.


  • Configurable headers
  • Generates sort urls
  • Uses Bootstrap table css by default
  • Provided column types enable quicker development time

Column Types

ResultTable offers a few different column types for calculations or displaying certain data types.

  • Column: default column type, supports visiblity and custom headers and filters
  • CheckBox: Generate a checkbox in a table cell
  • DateTime: Use php's DateTime object to format date strings
  • Link: generate anchor tags
  • Total: sum columns and puts a total in the table footer


You can quickly format a column when you add it to the table:


Required setup

Download the library, and just put it someplace you can autoload with composer:

"autoload": {
    "psr-4": {
      "ResultTable\\": "/path/to/src/"


$table = new ResultTable\Table( Paginator $dataSource);
      'filter'=>Form::text('first_name', Input::get('first_name'), ['placeholder'=>'First Name','class'=>'form-control']).
                '<br>'.Form::text('last_name', Input::get('last_name'), ['placeholder'=>'Last Name','class'=>'form-control']),
      'name' =>'full_name',
      'label'=>function( $data ){
              return $data->displayName();

echo $table->render();