Is there a way to automatically generate models from a MySQL DB in YII?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Gii to generate models, views and controllers for CRUD operations from tables.
You can enable Gii by inserting this code in your configuration file (uncomment it from the by yiic generated code).
Then browse to example.com/index.php?r=gii. Login to Gii and from there the process speaks from itself.
When asked for the Model name enter
*to create models for all tables in the database.