TL;DR:
- . , SearchesController ProductsController OrdersController ( PagesController).
SearchesController. . , "Views/Searches/", / css javascript /css/searches /js/searches/ ( , ).
(Models/Search.php) , : public $useTable = false; [details] , searches.
SearchController, function orders() function products(), $this->loadModel('Order'); [details], , SearchesController, .
" , ", - - :
$opts = array('limit'=>5);
$orders = $this->Order->search($string, $opts);
Order ( ) ( - ):
public function search($string = null, $opts = null) {
$params = array();
$params['limit'] = 10;
if(!empty($opts['limit'])) $params['limit'] = $opts['limit'];
return $this->find('all', $params);
}
- , , ... .. , , , .