所以我有以下控制器:
class ForwardsController extends AppController
{
public $uses = array('Offer', 'ExceptionUrl', 'Forward', 'Brand', 'MyModel, Website');
public $components = array('RequestHandler', 'HasOffers', 'BloglicHelper', 'Paginator', /*'DebugKit.Toolbar'*/);
public $categories = array();
public $helpers = array('Js' => array('Jquery'), 'Paginator');
public function beforeFilter()
{
parent::beforeFilter();
}
}
现在,当我尝试执行以下操作时:
$web = $this->Website->find('all');
我收到以下错误:
2013-09-09 10:08:14 Error: Fatal Error (1): Call to a member function find() on a non-object