In your cakephp3 folder, there is a file "routes.php" in config.
Open the "routes.php" and use:
use CakeRoutingRouter;
// Using the scoped route builder.
Router::scope('/', function ($routes) {
$routes->connect('/about-us', ['controller' => 'Pages', 'action' => 'view', 8]);
});
// Or using the static method.
Router::connect('/about-us', ['controller' => 'Pages', 'action' => 'view', 8]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…