Rendering CakePHP controller function without view is one of the common issues, faced by CakePHP developers. I myself had to search for hours to find this solution and thought to share this with you people. There are many occasions when you don’t want CakePHP controller or function to have a view file to render, to disable this you need to write the below code to do this magic for you.
Just write down this code in your CakePHP controller function and it will disable rendering and code will stop looking for view file:
$this->autoRender = false;
Hope it solves your problem.