add ListEloquentTable
This commit is contained in:
21
index.php
21
index.php
@ -34,14 +34,29 @@ $capsule->bootEloquent();
|
||||
|
||||
$schema = $capsule->schema();
|
||||
|
||||
$dataProvider = new EloquentDataProvider(\Itguild\EloquentTable\models\User::class, [
|
||||
//$dataProvider = new EloquentDataProvider(\Itguild\EloquentTable\models\User::class, [
|
||||
// 'currentPage' => 1,
|
||||
// 'perPage' => 3,
|
||||
// 'params' => ["class" => "table table-bordered", "border" => "2"],
|
||||
// 'baseUrl' => "/admin/user",
|
||||
//]);
|
||||
//$table = new ListJsonTable($dataProvider->getJson());
|
||||
//
|
||||
//$table->addAction(\Itguild\Tables\ActionColumn\EditActionColumn::class);
|
||||
//$table->create();
|
||||
//$table->render();
|
||||
|
||||
$table = new \Itguild\EloquentTable\ListEloquentTable([
|
||||
'model' => \Itguild\EloquentTable\models\User::class,
|
||||
'currentPage' => 1,
|
||||
'perPage' => 3,
|
||||
'params' => ["class" => "table table-bordered", "border" => "2"],
|
||||
'baseUrl' => "/admin/user",
|
||||
'actions' => [
|
||||
\Itguild\Tables\ActionColumn\ViewActionColumn::class,
|
||||
\Itguild\Tables\ActionColumn\EditActionColumn::class
|
||||
]
|
||||
]);
|
||||
$table = new ListJsonTable($dataProvider->getJson());
|
||||
|
||||
$table->addAction(\Itguild\Tables\ActionColumn\EditActionColumn::class);
|
||||
$table->create();
|
||||
$table->render();
|
Reference in New Issue
Block a user