Thursday, November 1, 2018

Generate Model, Controller, and Template in CakePHP 3.6

For generating model in cakePhp, we use bake command. The command format is "cake bake model yourModelName". Example :
So basically, when baking a model, we'll get 4 files namely model for table, model for entity, test fixture, and testCase table for article.


For baking controller :

And last is for template :

There is another simple way for baking all those tree items. We can use "cake bake all yourTableName", example is shown below :

No comments:

Post a Comment