Answer the question
In order to leave comments, you need to log in
Question about routing in Kohana?
Good for all! There is a task for routing Kokhan, I want to make such a
route "site.ru/city/type of institution/name/ - site.ru/london/pub/gunandroses"
and if the request goes to "site.ru/city" then it pulls out a list establishment by this city,
and if the request goes to "site.ru/city/type of establishment" then it pulls out a list of establishments by city and, upon request, the type of establishment
How to do this?
I'm thinking of making the city through cookies, or a third-level domain, which is better?
Route::set('default', '((/<city>)(/<type>)(/<name>))')
->defaults(array(
'controller' => 'places',
'action' => 'search',
));
Answer the question
In order to leave comments, you need to log in
Route - site.ru / city / type of institution / name
Route::set('place', '<city>(/<type>)(/<name>)')
->defaults(array(
'controller' => 'places',
'action' => 'place',
));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question