update full
This commit is contained in:
@ -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){
|
||||
|
Reference in New Issue
Block a user