["class" => "table table-bordered", "border" => "2"], 'baseUrl' => "/admin/settings/menu", ])); $table->beforePrint(function () use ($menu) { $btn = IconBtnListWidget::create(['url' => '/admin/settings/menu'])->run(); $btn .= IconBtnEditWidget::create(['url' => '/admin/settings/menu/update/' . $menu->id])->run(); $btn .= IconBtnDeleteWidget::create(['url' => '/admin/settings/menu/delete/' . $menu->id])->run(); return $btn; }); $table->rows([ 'parent_id' => (function ($data) { if ($data == 0) return null; return Menu::find($data)->label; }), 'icon_file' => function ($data) { return $data ? "" : ""; } ]); $table->create(); $table->render();