bosnadev / repository

Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.
https://bosnadev.com
825 stars 235 forks source link

applyCriteria not group bug #109

Closed dongm2ez closed 5 years ago

dongm2ez commented 5 years ago

https://github.com/bosnadev/repository/blob/d6f850c5d62aa022ea1110baf091c7045af8c883/src/Bosnadev/Repositories/Eloquent/Repository.php#L342

apply multiple criteria sql not group conditions。

you can update code look this:

  $this->model = $this->model->where(function ($query) use ($criteria){
                                      $criteria->apply(query, $this);
  });