<?php use app\components\Router; Router::setRoute(['' => 'app\\controllers\\Home:index']); Router::setRoute(['register' => 'app\\controllers\\Auth:register']); Router::setRoute(['login' => 'app\\controllers\\Auth:login']); Router::setRoute(['logout' => 'app\\controllers\\Auth:logout']); Router::setRoute(['profile' => 'app\\controllers\\Profile:index']);
<?php use app\components\Router; Router::setRoute(['/' => 'app\\controllers\\IndexController:index']); Router::setRoute(['/index/add[/:num]' => 'app\\controllers\\IndexController:add']); Router::setRoute(['/index/save' => 'app\\controllers\\IndexController:save']); Router::setRoute(['/index/load' => 'app\\controllers\\IndexController:load']); Router::setRoute(['/index/show' => 'app\\controllers\\IndexController:show']);