Skip to content

Commit

Permalink
fix: limiting ToMany relation results
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Sep 13, 2024
1 parent e913512 commit 0e59f4f
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 0e59f4f

Please sign in to comment.