I am using CakePHP 3.1 and whenever I make use of requestAction
, the page goes blank while I get an error in the console. The basic code is:-
$test = $this->requestAction('/dockets/find'.$articleList->id, [], ['return']);
While the dummy controller method is:-
function find($docket_id)
{
return 0;
}
Whenever I include the code in any view file (.ctp file), I get a blank page. I also get a console error saying the current url cannot be found. The url works fine if I don't include the above code.
Your first argument for
requestAction
is wrong, there is a missing/
afterfind
. It should be:-Alternatively, you could call
requestAction
using a router array:-