How do I get my Search controller with doSearch() function internally to call getTitles() function in my Titles controller?
The short answer is, you shouldn't do this. You should be moving that to your Title model or maybe put it in a component or helper for reuse.
If you're sure you want to call the controller directly, Cake does provide a method for this
http://book.cakephp.org/2.0/en/controllers.html#Controller::requestAction
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