Is it possible in CakePHP to organise controllers (and models) in subfolders? Thanks.
It's not deprecated at all. You can accomplish this using the App:build and point to your subfolders. For example, if you want to put all of your Twitter models in Model/Twitter to keep your code organized, you can add the following to the bootstrap.php
:
App::build(array(
'Model' => array(APP . 'Model' . DS . 'Twitter' . DS),
));
Now, any model file you put in Model/Twitter will be available when you call it.
See more here: http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::build
Yes you can, but it is deprecated. See the discussion here. The last post on this page describes how to do it in the bootstrap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With