This commit is contained in:
2024-08-07 12:23:49 +03:00
parent 59599f0344
commit 138c5149c1
3 changed files with 37 additions and 29 deletions

View File

@ -46,19 +46,28 @@ try {
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/user"
]));
$table->columns([
'created_at' => function ($data) {
if (!$data){
return null;
}
return (new DateTimeImmutable($data))->format("d-m-Y");
}
]);
$table->addAction(EditActionColumn::class);
$table->create();
$table->render();
} catch (Exception $e) {
}
//try {
// $table = new ViewEloquentTable(new ViewJsonTableEloquentModel(User::find(1), [
// 'params' => ["class" => "table table-bordered", "border" => "2"],
// 'baseUrl' => "/admin/user",
// ]));
// $table->create();
// $table->render();
//} catch (Exception $e) {
//}
try {
$table = new ViewEloquentTable(new ViewJsonTableEloquentModel(User::find(1), [
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/user",
]));
$table->create();
$table->render();
} catch (Exception $e) {
}