I need generate a crud that use two tables from Database.
Table 1: State(Primary key idState)
Table 2: City(Primary key idCity, foreign key: idState)
Actually I using command at docker console:
mux phx,gen,html Entitys state states [paremeters to relation two tables]
thanks for advice.
Have you checked embedded schemas?
Check this article to see an example as to how embedded schemas are used to manipulate multiple database schemas:
I like them because they also simplify the code in the controller side to a great extent as well.
The solution was more simple.
I will read the article.