Hi friends, In the older posts we learned about CakePHP. In this post, I would like to explain about how to call controller’s method within the view in CakePHP. This is a very simple post but it may use in few issues.
Assume below the controllers and method.
Controller: Products, Orders
Call the Products controller method in OrderDetails
$productObj = new ProductsController;
$productimage = $productObj->getProductImage($productId);
We can use this way also.