diff --git a/src/EloquentBuilderTrait.php b/src/EloquentBuilderTrait.php index bc10dad..c8cdf2c 100644 --- a/src/EloquentBuilderTrait.php +++ b/src/EloquentBuilderTrait.php @@ -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)) {