Hello reader's In this tutorial we will discuss about "How to call another controller function in a controller in cakephp".
For doing this, first of all import controller function in your controller that function you want to call.
Once you import the controller, crate an object of that controller than call the function through the created object(which have pointed the imported controller).
Here is a demo.
- /*Author: Jaydeep Dhoundiyal* /
- <?php
- //Import controller
- App::import('Controller', 'Users');
- class ReportsController extends AppController {
Read full Blog about How to call another controller function in a controller in cakephp visit Findnerd.
No comments:
Post a Comment