Route attribute

Minimal working example

The mandatory information a route needs is the path.

 

#[Route(path: '/path/to/the/page')]

 

The attribute must be declared inside a controller class and above a method.

Note: As the path is the first parameter you can omit the parameter name.

 

Refer the subpage for all available parameters with examples.