List routes in cakephp 3.x

How can I list all (non admin) routes in cakephp 3.x ?

You can call Router::routes() for that, however, this will show all routes, so you’ll have to filter out admin routes and the like manually.

Thank you for answering.
For those who are looking for this kind of things, you get the ‘admin’ prefix this way :
$route->defaults[‘prefix’] so to filter it out :
foreach($routes as $route) {
if (!isset($route->defaults[‘prefix’])) {

Thank you again

1 Like