Router::any('rests/update', 'Controllers\\Rests@update_restaurant'); Router::any('rests/update_all', 'Controllers\\Rests@update_all'); Router::any('rests', 'Controllers\\Rests@index'); Router::any('rest/(:num)/delivery_report', 'Controllers\\Rests@delivery_report'); Router::any('delivery_report/(:num)', 'Controllers\\Rests@delivery_report'); Router::any('delivery/(:num)', 'Controllers\\Rests@delivery_report'); Router::any('dishes/parse/(:num)', 'Controllers\\Rests@parse'); Router::any('dishes/parse_all', 'Controllers\\Rests@parse_all'); Router::any('ping', 'Controllers\\Rests@ping'); Router::any('login', 'Controllers\\Auth@login'); Router::any('register', 'Controllers\\Auth@register'); Router::any('logout', 'Controllers\\Auth@logout'); Router::any('user/dishes', 'Controllers\\User@dishes'); Router::any('user/rand_dish', 'Controllers\\User@rand_dish'); Router::any('favorite/(:num)/(:num)', 'Controllers\\User@manage_favorite'); Router::any('favorite/(:num)', 'Controllers\\User@manage_favorite'); Router::any('search', 'Controllers\\Search@search_post'); Router::any('search/(:any)', 'Controllers\\Search@search'); Router::any('advanced_search', 'Controllers\\Search@advanced_search'); Router::any('json/search', 'Controllers\\Json@search'); Router::any('json/all_dishes', 'Controllers\\Json@all_dishes'); Router::any('', 'Controllers\\Welcome@index'); //module routes $hooks = Hooks::get(); $hooks->run('routes'); //if no route found Router::error('Core\\Error@index'); //turn on old style routing Router::$fallback = false; //execute matched routes Router::dispatch();
<?php /** * Routes - all standard routes are defined here. * * @author David Carr - dave@daveismyname.com * @version 3.0 */ use Core\Router; use Helpers\Hooks; /** Define static routes. */ // Default Routing Router::any('', 'App\\Controllers\\Welcome@index'); Router::any('subpage', 'App\\Controllers\\Welcome@subPage'); Router::any('admin/(:any)(/(:any)(/(:any)(/(:any))))', 'App\\Controllers\\Demo@test'); // The Framework's Language Changer. Router::any('language/(:any)', 'App\\Controllers\\Language@change'); /** End default Routes */ /** Module Routes. */ $hooks = Hooks::get(); $hooks->run('routes'); /** End Module Routes. */ /** If no Route found. */ Router::error('App\\Controllers\\Error@index');