update full

This commit is contained in:
2024-12-04 13:11:12 +03:00
parent fd9439c9e2
commit 49399e456a
34 changed files with 780 additions and 121 deletions

View File

@ -24,6 +24,16 @@ $table = new ListEloquentTable(new EloquentDataProvider(Post::class, [
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/post"
]));
$entityRelation = new \kernel\EntityRelation();
$additionals = $entityRelation->getEntityRelationsBySlug("post");
foreach ($additionals as $additional) {
$table->addColumn($additional, $additional, function ($id) use ($entityRelation, $additional) {
return $entityRelation->getAdditionalPropertyByEntityId("post", $id, $additional);
});
}
$table->columns([
'created_at' => function ($data) {
if (!$data){