dev-master
9999999-dev https://github.com/nsbucky/resulttableTable creator for Laravel 4.2 projects
MIT
The Requires
- php >=5.4.0
The Development Requires
laravel html table grid
Wallogit.com
2017 © Pedro Peláez
Table creator for Laravel 4.2 projects
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., (*1)
ResultTable offers a few different column types for calculations or displaying certain data types., (*2)
You can quickly format a column when you add it to the table:, (*3)
->addColumn('name:formatter|option1:value1')
->addColumn('email_address:email')
Download the library, and just put it someplace you can autoload with composer:, (*4)
"autoload": {
"psr-4": {
"ResultTable\\": "/path/to/src/"
}
}
$table = new ResultTable\Table( Paginator $dataSource);
$table->addColumn('uniqid')
->addLinkColumn([
'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',
'filterName'=>['first_name','last_name'],
'label'=>function( $data ){
return $data->displayName();
},
'url'=>'/leads/{id}'
])
->addColumn('uploaded_image:image|width:50|height:50')
->addDateTimeColumn('created_at')
->addViewButton('/url/{id}');
echo $table->render();
Table creator for Laravel 4.2 projects
MIT
laravel html table grid