Route configuration

Routes are configured in path/to/jadu/config/routes.xml by adding a new <item> element.

A route is defined as below:

<item key="" method="POST" action="Jadu\UI\Controllers\ControlCentre\Utilities\Integrations::searchUsers">

The address the route applies to is given as the value in the <item> element, and is configured using the following attributes.

Attribute Description
key Unique name of the route
method HTTP request method
action The controller method to call when the route is used


Pattern matching can be used in the address section of the route. Examples of pattern matching are given below:

*                    // Match all request URIs
[i]                  // Match an integer
[i:id]               // Match an integer as 'id'
[a:action]           // Match alphanumeric characters as 'action'
[h:key]              // Match hexadecimal characters as 'key'
[:action]            // Match anything up to the next / or end of the URI as 'action'
[create|edit:action] // Match either 'create' or 'edit' as 'action'
[*]                  // Catch all (lazy)
[*:trailing]         // Catch all as 'trailing' (lazy)
[**:trailing]        // Catch all (possessive - will match the rest of the URI)
.[:format]?          // Match an optional parameter 'format' - a / or . before the block is also optional
/posts/[*:title][i:id]     // Matches "/posts/this-is-a-title-123"
/output.[xml|json:format]? // Matches "/output", "output.xml", "output.json"
/[:controller]?/[:action]? // Matches the typical /controller/action format

results matching ""

    No results matching ""