0

i m new to cakephp. i have stuck in one place the problem is
table name - india_tends
controller - tends
model name - india_tends

The problem is that cake php not allow tends to controller name its show that i have to use india_tends.. so any way to give tends to controller name?

1

3 Answers 3

1

use the variable $useTable="india_tends" and $name="tends" in model

Sign up to request clarification or add additional context in comments.

Comments

1

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/*

Comments

0

Which version of CakePHP are you using? You could use routing.

3 Comments

I would strongly suggest upgrading if possible.
@David: Your suggestion doesn't make much sense to me, he is already using the latest (stable) version of CakePHP.
Oh yeah, sorry ignore me. I'm confused. It must be due to a chronic lack of caffeine. goes to fix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.