Skip to content

Commit

Permalink
Fixing issue with undefined $model.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Sik committed Mar 22, 2016
1 parent cc9401b commit 26ed2d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Controllers/EntityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,12 @@ protected function getAllEntities($limit = null, $offset = null)
*/
protected function searchAllEntities($query, $limit = null, $offset = null, &$totalCount = null)
{
/* @var ElasticquentTrait $model */
$model = $this->getModel();

if (isset($query['percolate']) && $query['percolate']) {
$searchResults = $this->percolatedSearch($query);
} else {
/* @var ElasticquentTrait $model */
$model = $this->getModel();

$params = $this->convertQueryToElasticsearchRequest($query, $limit, $offset);
$searchResults = $model->complexSearch($params);
}
Expand Down

0 comments on commit 26ed2d2

Please sign in to comment.