Hi, I’ve just started to use cakephp but I have a lot of doubts.
First of all:
When I create a Controller, model and view wit a DB conection with:
cake bake all “name” it works fine but when I need no DB for one part of my webpage I can’t do anything because it don’t work.
So I delete this files:
/src/Controller/MyController.php
/src/Model/Entity/Model.php
/src/Model/Table/MyTable.php
/src/Template/MyTemplate/*
/tests/TestCase/
And add the following line in routes.php
$routes->connect(’/’, [‘controller’ => ‘Pages’, ‘action’ => ‘display’, ‘inicio’]);
This works, but when I do this I can’t see my layout in my page
I have the conection to Bootstrap and my header and footer in the layout but now I don’t work, and now I don’t have a controller to do my code in.
How can I do a controller model and view without a DB?
Thanks