Luminova Framework

Routing Attributes

Routing attributes let you define routes directly inside your controller methods using PHP attributes. This makes your route definitions cleaner, faster to maintain, and easier to read.

Table of Contents

  1. Route Attributes for HTTP and CLI Controller Methods

    Learn how to map HTTP requests and CLI commands directly to controller methods using Route attributes — with patterns, groups, middleware, and error handling.

  2. Error Attributes for HTTP Controllers

    Defines class-level error handlers for HTTP applications, allowing flexible error routing by context, URI pattern, and handler method.

  3. Prefix Attribute for HTTP Controllers

    Luminova’s Prefix attribute allows you to group URI prefixes in the controller class level for routing and optionally assign an error handler or exclude prefixes for routing performance.

  4. Group Attributes for CLI Command Controllers

    Defines a class-level group for CLI command controllers, allowing consistent command organization within a single class for more efficient routing and execution.