public function autoComplete() { $terms = $this->tag->autoCompletion(\Input::get('string')); $words = []; foreach ($terms as $tagEntity) { $words[] = $tagEntity->word; } return XePresenter::makeApi($words); }