0
votes

I'm using cakephp 2.5.4 and I tried to create a plugin named ContactManager. I created the folder ContactManager inside Plugin, than created both classes ContactManagerAppController and ContactManagerAppModel inside Plugin/ContactManager/Controller and Plugin/ContactManager/Model respectively. I, then, loaded all the plugins in bootstrap.php with loadAll(). But I got a "Missing Controller" error when I try to access it (localhost/myapp/ContactManager/SomeController). I changed the name of the folder to contact_manager and try to access it through (localhost/myapp/contact_manager/SomeController) it works just fine! Did I miss something?

UPDATE: Sorry, I made some tests (localhost/myapp/contact_manager/SomeController) points to ContactManager folder. It's only when I call (localhost/myapp/ContactManager/SomeController) that I get the "Missing Controller" error.

Thanks,

1

1 Answers

2
votes

You missed the convention. It's written in the docs. You should use snake_case for your URLs

So it's:

/myapp/some_plugin/some_controller/some_action

And maps to

  • SomePlugin plugin
  • SomeController controller
  • some_action action