jsonrai277 / json-php-router
Simple php router
v1.1.0
2024-05-25 11:43 UTC
Requires
- php: ^8.1
README
Simple router package.
Installation
You can install this package using
composer require jsonrai277/json-php-router
Usage
Usage.
use JsonRai277\PhpRouter\Router; require 'vendor/autoload.php'; Router::handle('GET', '/', 'home.php'); Router::get('/', 'home.php'); Router::get('/', function () { echo 'This is the home page.'; }); function homePage() { return 'This is the home page.'; } Router::get('/', 'homePage');