答案 0 :(得分: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');
答案 1 :(得分:-1)
您可以在控制器下阅读手册,loadModel()
就是您要查找的内容,或者您可以在堆栈交换中搜索答案,甚至可以谷歌搜索。