use controller method from model class in cakephp
问题 In my cakephp project, I use afterSave() method of a model class. In this method, I want to call another method that is located in app_controller file. class MyModel extends AppModel { var $name = 'MyModel'; function afterSave($created) { $this->MyController->updateData(); } } Here updateData() is located in app_controller file, which is extended by MyController controller. The above code does not work, so how can i actually call updateData() in this case.. Please guide. Thanks 回答1: This is