Skip to content

Commit

Permalink
fix: limiting ToMany relation results (#112)
Browse files Browse the repository at this point in the history
* fix: limiting ToMany relation results

* Run Prettier

---------

Co-authored-by: SychO9 <[email protected]>
  • Loading branch information
SychO9 and SychO9 authored Nov 1, 2024
1 parent cc41c28 commit a30aa59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Laravel/EloquentBuffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public static function load(
$resource,
$context,
$relationship,
$relation,
) {
$resource->scope($query, $context);

Expand All @@ -70,7 +71,7 @@ public static function load(
$relationship instanceof ToOne) &&
$relationship->scope
) {
($relationship->scope)($query, $context);
($relationship->scope)($relation, $context);
}
};
}
Expand Down

0 comments on commit a30aa59

Please sign in to comment.