Skip to content

Commit 6c1d6d6

Browse files
Support custom route key (#603)
1 parent a20f4d1 commit 6c1d6d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Http/Requests/Concerns/InteractWithRepositories.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ public function viaQuery(): Relation
9090

9191
public function modelQuery(?string $repositoryId = null, ?string $uriKey = null): Builder|Relation
9292
{
93-
return $this->newQuery($uriKey)->whereKey(
93+
return $this->newQuery($uriKey)->where(
94+
$this->model()->getRouteKeyName(),
9495
$repositoryId ?? $this->route('repositoryId')
9596
);
9697
}

0 commit comments

Comments
 (0)