CakePHP: How to call an action of another controller

by admin on July 24th, 2013


<?php
App::uses('AppController', 'Controller');
App::uses('EmployeesController', 'Controller');

class ReportingController extends AppController {

public function some(){

$Employees = new EmployeesController;
$Employees->constructClasses();

$Employees->areasAssigned();//areasAssigned function is in the Employees controller.

}

}

?>

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>