Bake every table in CakePHP?

13,405

Solution 1

To bake all of you models, use cake bake model all.

Controllers would be cake bake controller all

For Reference

Solution 2

.\console\cake bake model all 

In your app folder if you haven't yet set the path to cake.

Share:
13,405
NobleUplift
Author by

NobleUplift

I am a programmer in the Chicagoland area. I graduated from Saint Xavier University summa cum laude with a Bachelor of Science in Computer Science, a minor concentration in sociology, and a GPA of 3.865/4.0, and now I work for Advanse, a digital advertising company.

Updated on June 10, 2022

Comments

  • NobleUplift
    NobleUplift almost 2 years

    The database I'm working on has more than 100 tables, so I'm not going to sit here baking a model and controller for each one individually. I would like to bake all of the tables at the same time with something like the .xml files in Hibernate that tells it the limitations on fields so that I don't have to go through every column on every table, and automatically select the relationships. Is this possible?