Routes are compared in the order that they are initially specified.
If a route matches, then the associate handler is executed.
Matching stops if a handler writes a response.
If no matching route is found, then the request is not handled. A 404 error is generated.
You need to specify the HTTP method and the route to match. The
match() method takes the HTTP method, the match string, and the action callback as a parameter. The
patch() methods take only the match string and the action callback as a parameter and match the HTTP method of the same name. If you do not want to consider the HTTP method, then you use the
any() method to add a match string. This can be useful if you want to log a request or implement some special route handling that is valid for all...