rest controller

This commit is contained in:
2024-09-26 14:47:13 +03:00
parent 810ca49de4
commit d49416a7d2
10 changed files with 282 additions and 4 deletions

View File

@ -8,6 +8,15 @@ use kernel\modules\post\models\Post;
$form = new \itguild\forms\ActiveForm();
$form->beginForm(isset($model) ? "/admin/post/edit/" . $model->id : "/admin/post");
$form->field(\itguild\forms\inputs\TextInput::class, 'title', [
'class' => "form-control",
'placeholder' => 'Заголовок поста',
'value' => $model->title ?? ''
])
->setLabel("Заголовок")
->render();
$form->field(class: \itguild\forms\inputs\TextArea::class, name: "content", params: [
'class' => "form-control",
'placeholder' => 'Контент',