diff --git a/src/Repositories/EloquentRepository.php b/src/Repositories/EloquentRepository.php index de3797b..32e95a0 100644 --- a/src/Repositories/EloquentRepository.php +++ b/src/Repositories/EloquentRepository.php @@ -72,7 +72,7 @@ public function findWhere($where, $columns = ['*'], $with = []) $cacheKey = $this->generateKey([$where, $columns, $with]); return $this->cacheResults(get_called_class(), __FUNCTION__, $cacheKey, function() use ($where, $columns, $with) { - $model = $this->model->query(); + $model = $this->model instanceof Model ? $this->model->query() : $this->model; foreach ($where as $attribute => $value) { if (is_array($value)) {