src/SearchIndexHandlers/Algolia.php
public function getResults($query)
    {
        $parameters = [];

        if (is_object($query) && $query instanceof SearchQuery) {
            $query = $query->toArray();
        }

        if (is_array($query)) {
            $collection = new Collection($query);

            $query = $collection->pull('query', '');

            $parameters = $collection->toArray();
        }

        return $this->index->search($query, $parameters);
    }
public function getResults($query)
    {
        $parameters = [];

        if (is_object($query) && $query instanceof SearchQuery) {
            $query = $query->toArray();
        }

        if (is_array($query)) {
            $collection = new Collection($query);

            $query = $collection->pull('query', '');

            $parameters = $collection->toArray();
        }

        return $this->index->search($query, $parameters);
    }
public function getResults ( $ query ) { $ parameters = [ ] ; if ( is_object ( $ query ) && $ query instanceof SearchQuery ) { $ query = $ query -> toArray ( ) ; } if ( is_array ( $ query ) ) { $ collection = new Collection ( $ query ) ; $ query = $ collection -> pull ( 'query' , '' ) ; $ parameters = $ collection -> toArray ( ) ; } return $ this -> index -> search ( $ query , $ parameters ) ; }
Get the results for the given query.

@param string|array|\Spatie\SearchIndex\Query\Algolia\SearchQuery $query

@return mixed
Get the results for the given query .