["class" => "table table-bordered", "border" => "2"], 'baseUrl' => "/admin/user", ])); $table->beforePrint(function () use ($user) { $btn = IconBtnListWidget::create(['url' => '/admin/user'])->run(); $btn .= IconBtnEditWidget::create(['url' => '/admin/user/update/' . $user->id])->run(); $btn .= IconBtnDeleteWidget::create(['url' => '/admin/user/delete/' . $user->id])->run(); return $btn; }); $entityRelation = new \kernel\EntityRelation(); $additionals = $entityRelation->getEntityAdditionalProperty("user", $user); foreach ($additionals as $key => $additional) { $table->addRow($key, function () use ($additional) { return $additional; }, ['after' => 'email']); } $table->rows([ 'user_photo' => function ($data) { return $data ? "" : ""; }, '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->create(); $table->render();