Controllers in Cakephp Subfolders

Asked

Viewed 204 times

1

Would you like to know how I can put controllers in subfolders in Cake? I made the following change in bootstrap.php but it didn’t work:

     App::build(array(
     'Controller' => array(
          ROOT . 'app/Controller/Admin/'
     )
 ));

That is, inside the Controller folder, I have a folder called Admin. Right out of this folder, I created a Controller called Admcontroller and created a function there for tests called test, only it doesn’t work. I put in the browser the way:

http://localhost/cake/admin/adm/teste

and says I have to create the Admincontroller inside the Controller folder

Does anyone know what might be going on?

Thank you

  • It’s not working because you’re asking App::build() controller in folder admin, in case, Admincontroller, need to add the adm at the end of the string.

1 answer

2

Browser other questions tagged

You are not signed in. Login or sign up in order to post.