Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
esbenp committed Oct 17, 2021
1 parent 283485a commit 9e1c6c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/EloquentBuilderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ protected function applyResourceOptions($queryBuilder, array $options = [])
throw new InvalidArgumentException('Includes should be an array.');
}

$queryBuilder->with($includes);
if (!empty($includes)) {
$queryBuilder->with($includes);
}
}

if (isset($filter_groups)) {
Expand Down

0 comments on commit 9e1c6c0

Please sign in to comment.