Tutorial by Examples

// Define new router group $api = new \Phalcon\Mvc\Router\Group([ 'module' => 'api', ]); $api->setPrefix('/api/v1'); // API routes (Maps to Cotnroller::Action) $api->addGet('/users', 'Users::index'); $api->addGet('/users/search/{query}', 'Users::search'); $api->addGet('/...
$router = new \Phalcon\Mvc\Router(false); $router->removeExtraSlashes(true); $request = new \Phalcon\Http\Request(); $action = strtolower($request->getMethod()); // get, post, etc. $modules = ['calendar', 'main', 'user']; // names of the modules you create // you can define other static...

Page 1 of 1