How to create a Controller in CakePHP without setting up database tables?
I am very new to cakePHP but I am a bit knowledgeable with Ruby on Rails. I tried creating a controller using the cake bake
command in the console but it said:
开发者_如何学PythonYour database does not have any tables
As far as I can remember in rails, it allowed me to create controllers without tables or even without setting up database. What I am trying to do is that I want to create a controller and a view for pages such as Home, About, and Help. I don't think those pages still need a model or a database table. Pls help.
sure you can create controllers and views... even models without tables.
But you can't bake them =D bake is just to read the database and help you create your classes from there. So if you dont have any table, you dont have anything to bake..
For the static pages such as Home, About and Help you could use the PagesController
Cheers!
精彩评论