Skip to content

Commit

Permalink
Merge pull request #37 from vietartisans/laravel6
Browse files Browse the repository at this point in the history
Laravel 6 compatible
  • Loading branch information
OzanKurt committed Sep 19, 2019
2 parents d6eaac7 + ed672e4 commit 045c993
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Repositories/Eloquent/AbstractRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Kurt\Repoist\Exceptions\NoEntityDefined;
use Kurt\Repoist\Repositories\Contracts\RepositoryInterface;
use Kurt\Repoist\Repositories\Criteria\CriteriaInterface;
use Illuminate\Support\Arr;

abstract class AbstractRepository implements RepositoryInterface, CriteriaInterface
{
Expand Down Expand Up @@ -136,7 +137,7 @@ public function delete($id)
*/
public function withCriteria(...$criteria)
{
$criteria = array_flatten($criteria);
$criteria = Arr::flatten($criteria);

foreach ($criteria as $criterion) {
$this->entity = $criterion->apply($this->entity);
Expand Down

0 comments on commit 045c993

Please sign in to comment.