code: public function autocomplete($text)
      {
          if (! $this->builder) {
              $this->builder = $this->model;
          }
          
          $fields = $this->model->getAutocomplete();
          
          foreach ($fields as $field) {
              
              $this->builder = $this->builder->where(function ($query) use ($field, $text) {
                  $query->orWhere($field, 'like', "%$text%");
              });
          }
          
          return $this;
      }
docs: Autocomplete
  
  @return array;