Skip to content

Commit 045c993

Browse files
authored
Merge pull request #37 from vietartisans/laravel6
Laravel 6 compatible
2 parents d6eaac7 + ed672e4 commit 045c993

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Repositories/Eloquent/AbstractRepository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Kurt\Repoist\Exceptions\NoEntityDefined;
77
use Kurt\Repoist\Repositories\Contracts\RepositoryInterface;
88
use Kurt\Repoist\Repositories\Criteria\CriteriaInterface;
9+
use Illuminate\Support\Arr;
910

1011
abstract class AbstractRepository implements RepositoryInterface, CriteriaInterface
1112
{
@@ -136,7 +137,7 @@ public function delete($id)
136137
*/
137138
public function withCriteria(...$criteria)
138139
{
139-
$criteria = array_flatten($criteria);
140+
$criteria = Arr::flatten($criteria);
140141

141142
foreach ($criteria as $criterion) {
142143
$this->entity = $criterion->apply($this->entity);

0 commit comments

Comments
 (0)