Universeorange.com/Docs/

R3m/framework Function reference route.get

{route.get(String $name, Array $options=>[])}

Returns an url as defined in a Route.json file.

Example

Load a resource:

{
    "79fae73c-17b0-4395-90bb-38549a36ed8d":{
        "resource": "{$project.dir.host}Universeorange/Com/Docs/Data/Route.json"
    }
}

Define a route:

 "universeorange-com-docs-page": {
        "path": "/Docs/{$page}",
        "host": [
            "universeorange.com"
        ],        
        "controller" : "Host.Universeorange.Com.Docs.Controller.Page.get",
        "method": [
            "GET",
            "POST"
        ]
    },
{route.get('universeorange-com-docs-page' ['Welcome'])} // results in: https://universeorange.com/Docs/Welcome/

Returns the route url as a string.

Last modified: 2021-06-07

© 2021 universeorange.com