Skip to content

Commit a30aa59

Browse files
authored
fix: limiting ToMany relation results (#112)
* fix: limiting ToMany relation results * Run Prettier --------- Co-authored-by: SychO9 <[email protected]>
1 parent cc41c28 commit a30aa59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Laravel/EloquentBuffer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public static function load(
6262
$resource,
6363
$context,
6464
$relationship,
65+
$relation,
6566
) {
6667
$resource->scope($query, $context);
6768

@@ -70,7 +71,7 @@ public static function load(
7071
$relationship instanceof ToOne) &&
7172
$relationship->scope
7273
) {
73-
($relationship->scope)($query, $context);
74+
($relationship->scope)($relation, $context);
7475
}
7576
};
7677
}

0 commit comments

Comments
 (0)