This commit is contained in:
2024-09-06 11:47:11 +03:00
parent 9f132e7bc4
commit 4e031c7c8b
5 changed files with 5 additions and 47 deletions

View File

@ -22,21 +22,7 @@ $table->columns([
'parent_id' => (function ($data) {
if ($data == 0) return null;
return Menu::find($data)->label;
}),
'created_at' => function ($data) {
if (!$data){
return null;
}
return (new DateTimeImmutable($data))->format("d-m-Y");
},
'updated_at' => function ($data) {
if (!$data){
return null;
}
return (new DateTimeImmutable($data))->format("d-m-Y");
}
})
]);
$table->beforePrint(function () {
return PrimaryBtn::create("Создать", "/admin/menu/create")->fetch();