Unitrai

How to use request data in a component in CakePHP

5 June 2020

"Add this in your component public function initialize(Controller $controller) { $this->controller = $controller; } Then access the request data in the component as follows: $this->controller->request->data  "

"Add this in your component
public function initialize(Controller $controller) { $this->controller = $controller; }
Then access the request data in the component as follows:
$this->controller->request->data
 "
#Web

Share this post