Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

Commit

Permalink
Update EloquentRepository.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidesu authored Sep 22, 2016
1 parent 830963d commit c79f0f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Repositories/EloquentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit c79f0f5

Please sign in to comment.