Skip to content

Commit 6bde46c

Browse files
committed
Pass request to the collectMiddlewares
1 parent e923b56 commit 6bde46c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Http/Requests/InteractWithRepositories.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function repository($key = null): ?Repository
5353

5454
app(Pipeline::class)
5555
->send($this)
56-
->through($repository::collectMiddlewares()->toArray())
56+
->through($repository::collectMiddlewares($this)->toArray())
5757
->thenReturn();
5858
});
5959

src/Repositories/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ public function availableFilters(RestifyRequest $request)
739739
->values();
740740
}
741741

742-
public static function collectMiddlewares(): Collection
742+
public static function collectMiddlewares(RestifyRequest $request): Collection
743743
{
744744
return collect(static::$middlewares);
745745
}

0 commit comments

Comments
 (0)