["class" => "table table-bordered", "border" => "2"], 'baseUrl' => "/admin/user", ]); $table = new ViewJsonTable($dataProvider->getJson()); $table->beforeTable(function () use ($content) { $btn = PrimaryBtn::create("Список", "/admin/post")->fetch(); $btn .= SuccessBtn::create("Редактировать", "/admin/post/update/" . $content->id)->fetch(); $btn .= DangerBtn::create("Удалить", "/admin/post/delete/" . $content->id)->fetch(); return $btn; }); $table->create(); $table->render();