date fix
This commit is contained in:
27
index.php
27
index.php
@ -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) {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user