From 4fcb8f82e83c9214a308eade8e01fb42a3257d7a Mon Sep 17 00:00:00 2001 From: Ken van der Eerden Date: Tue, 2 Aug 2022 16:11:46 +0200 Subject: [PATCH] Update RouteRegistrar.php (#43509) Allow a route groups to also call the dynamic where methods described in https://laravel.com/docs/9.x/routing#parameters-regular-expression-constraints E.g. ```php Route::prefix('/{something}')->whereIn('something', ['foo', 'bar'])->group(function() {}); ``` --- src/Illuminate/Routing/RouteRegistrar.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Illuminate/Routing/RouteRegistrar.php b/src/Illuminate/Routing/RouteRegistrar.php index 2e12ad2627bc..5da926c6311a 100644 --- a/src/Illuminate/Routing/RouteRegistrar.php +++ b/src/Illuminate/Routing/RouteRegistrar.php @@ -25,6 +25,7 @@ * @method \Illuminate\Routing\RouteRegistrar prefix(string $prefix) * @method \Illuminate\Routing\RouteRegistrar scopeBindings() * @method \Illuminate\Routing\RouteRegistrar where(array $where) + * @method \Illuminate\Routing\RouteRegistrar whereIn(array|string $parameters, array $values) * @method \Illuminate\Routing\RouteRegistrar withoutMiddleware(array|string $middleware) */ class RouteRegistrar @@ -67,6 +68,7 @@ class RouteRegistrar 'prefix', 'scopeBindings', 'where', + 'whereIn', 'withoutMiddleware', ];