Answer the question
In order to leave comments, you need to log in
How to prepare DB tables for Yii?
Do I understand correctly that I first need to design and create my database tables in phpmyadmin, for example, and then based on them I create controllers and so on from Yii itself?
ps I'm still learning
Answer the question
In order to leave comments, you need to log in
There are two different approaches: Database-first and Code-first. Yii insists on a Database-first approach, which you get roughly right. It is advisable to start designing a database not with phpmyadmin, but with a visual representation of the schema (although phpmyadmin also has a schema designer, it is not very convenient to get started).
In the tool that I indicated, you can then generate code and push it into migrations, then carry out these migrations, and then work with Gii
Design on a piece of paper, create a migration with a database structure, migrate (a database will be created), and then everything else.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question