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

Routing rules order [suspended / probably csrf] #1798

Closed
nowackipawel opened this issue Mar 8, 2019 · 0 comments
Closed

Routing rules order [suspended / probably csrf] #1798

nowackipawel opened this issue Mar 8, 2019 · 0 comments

Comments

@nowackipawel
Copy link
Contributor

nowackipawel commented Mar 8, 2019

DOCS:

The routes are matched in the order they are specified, so if you have a resource photos above a get ‘photos/poll’ the show action’s route for the resource line will be matched before the get line. 

My rules:

	$routes->group(
		'/',
		['subdomain' => 'dev'],
		function ($routes) {
			$routes->get('pakiety-dla-kursantow', 'App\Controllers\Site\CUser::students_package', ['as' => 'students_packages']);
			$routes->add('pakiety-dla-kursantow/wynik', 'App\Controllers\Site\CUser::students_package_result', ['as' => 'payment_user_panel_service_result']); 
			$routes->add('pakiety-dla-kursantow/(:slug_20)', 'App\Controllers\Site\CUser::students_package_item/$1', ['as' => 'students_package_item']); 
});

Calling POST to:

https://dev.host.com/pakiety-dla-kursantow/wynik?status=OK

is opening


			$routes->add('pakiety-dla-kursantow/(:slug_20)', 'App\Controllers\Site\CUser::students_package_item/$1', ['as' => 'students_package_item']);

instead of:


			$routes->add('pakiety-dla-kursantow/wynik', 'App\Controllers\Site\CUser::students_package_result', ['as' => 'payment_user_panel_service_result']); 

which is defined first.

@nowackipawel nowackipawel changed the title Routing rules order Routing rules order [suspended / probably csrf] Mar 8, 2019
@nowackipawel nowackipawel changed the title Routing rules order [suspended / probably csrf] Routing rules order [suspended / probably csrf] Mar 8, 2019
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

1 participant