cakephpcakephp-bake

Cake doesn't not bake all templates


I have created 3 database tables which follows the CakePHP naming convensions. When I try to bake the code with the following command it generates only 3 files in the 'App/src/Template/Worksheets' which is 'view', 'add' and 'edit'.

i.e bin\cake bake all worksheets

There is no 'index' file being generated, only the ones mentioned above. When I started developing the app the bake command work flawlessly and generated the 'index' file with no problems at all.

Cake doesn't give any errors in the console and it just runs without baking a template for 'index'.

Is there a way to fix this?


Solution

  • So if you type this command in console, after you have baked all the other views, you can create those which is missing. I.e index.ctp

    cake bake template <model> <action>
    

    And for my problem:

    bin\cake bake template worksheets index
    

    This works flawlessly.