我正在调用的元素文件:
$brand = $this->requestAction('brands/buyer_getnames/');
我正在调用的操作文件:
public function buyer_getnames(){
$newid=$this->Auth->User('brand_id');
$name=$this->Brand->find('first',array('conditions'=>array('Brand.id'=>$newid),'recursive'=>-1));
return $name['Brand']['name'];
}
下面出现错误..!!
Private Method in BrandsController
Error: BrandsController::buyer_getnames() cannot be accessed directly.
请帮忙