M
M
Messi2019-07-11 08:19:03
symfony
Messi, 2019-07-11 08:19:03

How to organize a simple method in Symfony?

Good afternoon! I understand with symfony3, the question may seem silly, but still I ask for hints:
I have a User Entity (In the User base) and it has a lang field .
The question is what, you need to switch lang. And I don't understand how to organize it correctly?
Create a separate Action in the UserController controller, changeLangAction in which to accept lang from the user, then check in a separately created form with one field and then update it in the database?
The method is working, but it confuses that for one field you need to write another form.
Or is it ok?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question