This commit is contained in:
2024-11-25 15:17:41 +03:00
parent 1bc7662be0
commit 745707ee09
8 changed files with 81 additions and 39 deletions

View File

@ -36,7 +36,7 @@ class PostController extends AdminController
$post = $this->postService->create($postForm);
$entityRelation = new EntityRelation();
$entityRelation->saveEntityRelation("post", new Request());
$entityRelation->saveEntityRelation(entity: "post", model: $post, request: new Request());
if ($post) {
$this->redirect("/admin/post/view/" . $post->id);

View File

@ -34,7 +34,7 @@ $form->field(class: \itguild\forms\inputs\Select::class, name: "user_id", params
->render();
$entityRelations = new \kernel\EntityRelation();
$entityRelations->renderEntityAdditionalPropertyFormBySlug("post");
$entityRelations->renderEntityAdditionalPropertyFormBySlug("post", $model);
?>
<div class="row">