crud menu
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
*/
|
||||
|
||||
use app\models\Post;
|
||||
use app\models\User;
|
||||
|
||||
$form = new \itguild\forms\ActiveForm();
|
||||
$form->beginForm(isset($model) ? "/admin/post/edit/" . $model->id : "/admin/post");
|
||||
@ -18,7 +17,6 @@ $form->field(class: \itguild\forms\inputs\TextArea::class, name: "content", para
|
||||
->setLabel("Пост")
|
||||
->render();
|
||||
$form->field(class: \itguild\forms\inputs\Select::class, name: "user_id", params: [
|
||||
//$form->field(class: \itguild\forms\inputs\Select::class, name: "username", params: [
|
||||
'class' => "form-control",
|
||||
'value' => $model->user_id ?? ''
|
||||
])
|
||||
|
@ -7,9 +7,9 @@
|
||||
|
||||
use app\models\Post;
|
||||
use app\models\User;
|
||||
use app\tables\columns\PostDeleteActionColumn;
|
||||
use app\tables\columns\PostEditActionColumn;
|
||||
use app\tables\columns\PostViewActionColumn;
|
||||
use app\tables\columns\post\PostDeleteActionColumn;
|
||||
use app\tables\columns\post\PostEditActionColumn;
|
||||
use app\tables\columns\post\PostViewActionColumn;
|
||||
use Itguild\EloquentTable\EloquentDataProvider;
|
||||
use Itguild\EloquentTable\ListEloquentTable;
|
||||
use kernel\IGTabel\btn\PrimaryBtn;
|
||||
|
@ -11,20 +11,6 @@ use kernel\IGTabel\btn\DangerBtn;
|
||||
use kernel\IGTabel\btn\PrimaryBtn;
|
||||
use kernel\IGTabel\btn\SuccessBtn;
|
||||
|
||||
//$dataProvider = new ViewJsonTableEloquentModel($content, [
|
||||
// 'params' => ["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();
|
||||
|
||||
$table = new ViewEloquentTable(new ViewJsonTableEloquentModel($content, [
|
||||
'params' => ["class" => "table table-bordered", "border" => "2"],
|
||||
'baseUrl' => "/admin/post",
|
||||
|
Reference in New Issue
Block a user