Cakephp controller name
i m new to cakephp. i have stuck in one place the problem is
table name - india_tends controller - tends model name - india_tendsThe problem is that cake php not allow tends to controller name its show that i h开发者_Python百科ave to use india_tends.. so any way to give tends to controller name?
use the variable $useTable="india_tends"
and $name="tends"
in model
If your table name is india_tends
, then your controller code should be in the file india_tends_controller.php
, and the class name should be IndiaTendsController
.
In your case I think you want the IndiaTendsController
to be accessible through /tends/:actions
so the best guess would be using routing
.
Edit your config/routes.php
to have the following code:
Router::connect('/tends/*', array('controller' => 'india_tends'));
And you can have it accessible through /tends/*
Which version of CakePHP are you using? You could use routing.
精彩评论