Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RouteRegistrar.php #43509

Merged
merged 1 commit into from Aug 2, 2022
Merged

Update RouteRegistrar.php #43509

merged 1 commit into from Aug 2, 2022

Conversation

Ken-vdE
Copy link
Contributor

@Ken-vdE Ken-vdE commented Aug 2, 2022

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.

Route::prefix('/{something}')->whereIn('something', ['foo', 'bar'])->group(function() {});

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() {});
```
@taylorotwell taylorotwell merged commit d004416 into laravel:9.x Aug 2, 2022
17 checks passed
@Ken-vdE
Copy link
Contributor Author

Ken-vdE commented Aug 3, 2022

@taylorotwell This does not work and should be reverted. It seems the RouteRegistrar::__call() method does not pass the parameters correctly. The passed array is omitted there. I don't see a clear solution other then adding another if exception for the 'whereIn' just like the if ($method === 'middleware') { statement in that __call method.
Do you think that would be an acceptable solution?

Ken-vdE added a commit to Ken-vdE/framework that referenced this pull request Aug 3, 2022
@ankurk91
Copy link
Contributor

ankurk91 commented Aug 3, 2022

We should not accept PRs without tests.

taylorotwell pushed a commit that referenced this pull request Aug 3, 2022
Ken-vdE added a commit to Ken-vdE/framework that referenced this pull request Aug 9, 2022
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() {});
```
Ken-vdE added a commit to Ken-vdE/framework that referenced this pull request Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants