Answer the question
In order to leave comments, you need to log in
How to convert the array correctly when submitting the form to the view?
Tell me how to convert the array correctly when submitting the form to the Symfony view?
There are 2 entities: Chat and Group, they have a ManyToOne relationship. You need to make a view with the ability to edit the chat, and in it edit the group with which the chat has a connection. I made a form, cut it in the controller and passed it to the view, but the following error pops up:
Object of class Proxies\__CG__\App\Entity\Group could not be converted to string
$builder
...
->add('group')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question