Skip to content

ABGEO/WEBII-HW02-Routing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WEBII-HW02-Routing

Including

Include Autoloader

require_once __DIR__ . '/Services/autoloader.php';

Import class

use web2hw\Router;

Create routes file

The routes file is a json file, where object key is route unique name.

Each route must have path, method and action keys. Homepage route example:

{
  "homepage": {
    "path": "/",
    "method": "GET",
    "action": "web2hw\\DefaultController::index"
  }
}

Releases

No releases published

Packages

No packages published

Languages