public function __construct(Search $search, Auto $autocomplete) { $this->beforeFilter('csrf', array('on' => 'post')); $this->search = $search; $this->autocomplete = $autocomplete; //get search provider name for differianting between //different providers query caches $this->options = App::make('options'); $this->provider = $this->options->getSearchProvider(); }
public function __construct(Search $search, SearchAdmin $searchAdmin, Auto $autocomplete, Cacher $cache) { $this->beforeFilter('csrf', array('on' => 'post')); $this->cache = $cache; $this->autocomplete = $autocomplete; //get search provider name for differianting between //different providers query caches $this->options = App::make('Options'); if (Helpers::hasAccess('super')) { $this->search = $searchAdmin; $this->provider = $this->options->getSearchProvider(); } else { $this->search = $search; $this->provider = 'db'; } }