post crud fix
This commit is contained in:
@ -18,13 +18,14 @@ $dataProvider = new ListJsonTableEloquentCollection($contents, [
|
||||
'params' => ["class" => "table table-bordered", "border" => "2"],
|
||||
'baseUrl' => "/admin/post",
|
||||
]);
|
||||
|
||||
$table = new ListJsonTable($dataProvider->getJson());
|
||||
$table->beforePrint(function (){
|
||||
return PrimaryBtn::create("Создать", "/admin/post/create")->fetch();
|
||||
//return (new PrimaryBtn("Создать", "/admin/user/create"))->fetch();
|
||||
});
|
||||
$table->addAction(UserViewActionColumn::class);
|
||||
$table->addAction(UserEditActionColumn::class);
|
||||
$table->addAction(\app\tables\columns\PostEditActionColumn::class);
|
||||
$table->addAction(UserDeleteActionColumn::class);
|
||||
$table->create();
|
||||
$table->render();
|
Reference in New Issue
Block a user