Reference

(:num)

Matches any number

Example

/site/config/config.php
return [
  'routes' => [
    [
      'pattern' => '/projects/(:num)',
      'action'  => function ($num) {
        // react to requests
      }
    ]
  ]
];