How to use request data in a component in CakePHP

How to use request data in a component in CakePHP

“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

 “

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *