Cakephp 3 unaccessible plugin's controller

#1

Hello guys! I can’t access my plugin’s controllers. I can get inside the controller’s file with a die() but if i try to make that die() inside de class i get an error “no page found”. I’m working on a project built before me and i’m a newbie in cakephp… in the mean time, I created a brand new app and baked a plugin and controllers I could access my controllers with no problem at all with the default routes /projectName/pluginName/controller/method everything worked perfectly well! please help!

#2

So if I understand correctly, you want to access your controllers by means of routes?
Then try something like this:

['plugin' => 'myPlugin', 'controller' => 'myController', 'action' => 'index']

Note the plugin definition, it tells your app to go look in your plugin :slight_smile:
I do want to add that if you want to route to the main app from a plugin’s controller, you’ll want to set plugin to null:

['plugin' => null, 'controller' => 'myController', 'action' => 'index']