CakePHP : Load Model from other Controller

In your Controller were you want to load the model.


  class ReportsController extends AppController { 
    public function other_reports() {

          //this will load other model 
          $otherModels = $this->OtherModel->find('all');
          $this->set('otherModels', $otherModels);

Post a Comment

Popular posts from this blog

CakeAdminLTE is based on AdminLTE Theme for CakePHP 2.4+

CakePHP: COUNT data and GROUP BY date

CakePHP: Calling function from other controller