canax/router

View on GitHub
config/router/700_example.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
 * These routes are for demonstration purpose, to show how routes and
 * handlers can be created.
 */
return [
    // Path where to mount the routes, is added to each route path.
    "mount" => "example",

    // All routes in order
    "routes" => [
        [
            "info" => "Just say hi with a string.",
            "method" => null,
            "path" => "hi",
            "handler" => function () {
                //echo "Ho";
                return "Hi.";
            },
        ],
    ]
];