["class" => "table table-bordered", "border" => "2"], 'baseUrl' => "/admin/settings/menu", ])); $table->beforePrint(function () use ($menu) { $btn = PrimaryBtn::create("Список", "/admin/settings/menu")->fetch(); $btn .= SuccessBtn::create("Редактировать", "/admin/settings/menu/update/" . $menu->id)->fetch(); $btn .= DangerBtn::create("Удалить", "/admin/settings/menu/delete/" . $menu->id)->fetch(); return $btn; }); $table->rows([ 'parent_id' => (function ($data) { if ($data == 0) return null; return Menu::find($data)->label; }) ]); $table->create(); $table->render();