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.x] Missing OPTIONS HTTP verb in Route::any #20697

Closed
Sanfra1407 opened this issue Aug 23, 2017 · 1 comment
Closed

[5.x] Missing OPTIONS HTTP verb in Route::any #20697

Sanfra1407 opened this issue Aug 23, 2017 · 1 comment

Comments

@Sanfra1407
Copy link

Affected versions:

  • 5.1
  • 5.2
  • 5.3
  • 5.4
  • 5.5

Description:

OPTIONS verb is missing from Route::any() and it's not handled by any().

To do that you have to write:
Route::match(['get', 'head', 'options', 'post', 'put', 'patch', 'delete'], 'orders/{customer_id}', 'OrdersController@getOrders');

instead of

Route::any('orders/{customer_id}', 'OrdersController@getOrders');

Files:

vendor/laravel/framework/src/Illuminate/Routing/Router.php

@themsaid
Copy link
Member

This was discussed many times, please search the issues history.

taylorotwell pushed a commit that referenced this issue Aug 23, 2017
* Updated route any to include all supported verbs

added OPTIONS as route any which to be referenced from own static supported verbs

* Update Router.php

* Update Router.php
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