2013-10-02 87 views

回答

-1

您閱讀了控制器下的手冊,您將在那裏找到loadModel()或者您搜索堆棧交換的答案或甚至谷歌它。

1

有兩種方式,使這個:

// Call in Controller's methods to load dynamically model Article and set it to $this->User 
$this->loadModel('User'); 

// Add this variable as Controller's property and get $this->Post and $this->User accessible 
var $uses = array('Post','User'); 

瞭解更多關於Controller::$usesController::loadModel

相關問題