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

[5.5] Route::middleware doesn't accept arrays #21618

Closed
sebastiandedeyne opened this issue Oct 11, 2017 · 1 comment
Closed

[5.5] Route::middleware doesn't accept arrays #21618

sebastiandedeyne opened this issue Oct 11, 2017 · 1 comment

Comments

@sebastiandedeyne
Copy link
Contributor

  • Laravel Version: 5.5
  • PHP Version: Any

Description:

Calling middleware statically behaves differently than chaining the method.

When digging into the source this makes sense looking at the implementation, but can be very confusing in usage + the error is silent.

Steps To Reproduce:

Route::middleware('foo', 'bar')->get('/'); // Only 'foo' is registered
Route::get('/')->middleware('foo', 'bar'); // Both middlewares are registered
@themsaid
Copy link
Member

Submitted a PR to allow this to work at #21621

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

No branches or pull requests

2 participants