2013年10月21日 星期一

[CakePHP] Call another Controller's method from a Controller

Use RequestAction() carefully:

$itemD = $this->requestAction(array('controller'=>'items', 'action'=>'findByItId', 'it_id' => $item['it_id']));


http://stackoverflow.com/questions/13947393/cakephp-importing-one-controller-inside-another-controller



If models have been linked (using hasMany, belongsTo, etc.) :

$supplier=$this->Delivery->Supplier->findBySpId($sp_id);

沒有留言:

張貼留言

[設計軟硬件] 2026年3月份關於設計軟硬件價錢的資料搜集

Hardware Macbook Pro 16吋 M5 Pro 銀色 標準顯示器 48GB RAM 2TB SSD Storage HK$27,999 Arduino Hardware with sensors & software for control TaoBao ...