virutmath / table-admin
后端列表记录
1.1.0
2019-09-11 08:11 UTC
Requires
- php: >=7.0
- illuminate/support: ^5.2
README
- 项目独立的TableAdmin
- 使用Bootstrap样式,
iCheck,select2类 - 支持表格分页
用法
$config = [
'show' => [
'id' => true
],
'formatDate' => 'd/m/Y',
'defaultOptionLabel' => '',
'pageSize' => 30,
'module'=>'',
'idField'=>'id',
];
$categories = [
1=>'Category 1',
2=>'Category 2'
];
$listRecord = [
[
'id'=>1,
'name'=>'Jame Doe',
'category_id'=>1
'active'=>1
],
[
'id'=>2,
'name'=>'Joe Doe',
'category_id'=>2
'active'=>0
]
];
$table = new TableAdmin($listRecord,$config);
$table->column('id','ID record','text');
$table->columnDropdown('category_id','Category',$categories);
$table->column('active','Active','checkbox');
$table->column('id','Edit','edit');
$table->column('id','Delete','delete');
echo $table->render();