Posted By

sveggiani on 01/09/09


Tagged

cakephp models


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Milad


import/load a model in Cakephp


 / Published in: PHP
 

  1. if (App::import('Model', 'Sheet')) {
  2. $this->Sheet = new Sheet();
  3. }
  4.  
  5.  
  6. // Update, Cakephp 1.3
  7. $this->loadModel('Article');
  8. $recentArticles = $this->Article->find('all', array('limit' => 5, 'order' => 'Article.created DESC'));

Report this snippet  

You need to login to post a comment.