$page_number, 'perPage' => 8, 'params' => ["class" => "table table-bordered", "border" => "2"], 'baseUrl' => "/admin/settings/menu", ])); $table->columns([ 'parent_id' => (function ($data) { if ($data == 0) return null; return Menu::find($data)->label; }), 'icon_file' => function ($data) { return $data ? "" : ""; } ]); $table->beforePrint(function () { return IconBtnCreateWidget::create(['url' => '/admin/settings/menu/create'])->run(); }); $table->addAction(function($row) { return IconBtnViewWidget::create(['url' => '/admin/settings/menu/view/' . $row['id']])->run(); }); $table->addAction(function($row) { return IconBtnEditWidget::create(['url' => '/admin/settings/menu/update/' . $row['id']])->run(); }); $table->addAction(function($row) { return IconBtnDeleteWidget::create(['url' => '/admin/settings/menu/delete/' . $row['id']])->run(); }); $table->create(); $table->render();