Exemple #1
0
 public function forSelection()
 {
     $term = $this->input->get('q', null, 'default');
     $key = new \MongoRegex('/' . $term . '/i');
     $results = \Shop\Models\Regions::forSelection(array('name' => $key));
     $response = new \stdClass();
     $response->more = false;
     $response->term = $term;
     $response->results = $results;
     return $this->outputJson($response);
 }