Bug: getRoutesOptions return wrong when I have >2 routes has same name, but different method (HTTPVerb) #3700
Labels
bug
Verified issues on the current code behavior or pull requests that will fix them
//my routes
$routes->get('product/add', 'App\Product::add', ['as' => 'app_product_add']);
$routes->post('product/add', 'App\Product::add_ajax', ['as' => 'app_product_add_ajax']);
//my function
$router = \Config\Services::router();
$match = $router->getMatchedRoute(); // => IT'S OK
$options = $router->getMatchedRouteOptions(); //=> WRONG BY METHOD
$options alway is:
['as' => 'app_product_add_ajax']
I want setMethod() and default method by current request in here for return right options
How can't I hot fix this bug?
Help me.
Thanks
The text was updated successfully, but these errors were encountered: