jsonrai277/json-php-router

v1.1.0 2024-05-25 11:43 UTC

This package is auto-updated.

Last update: 2024-10-25 12:38:46 UTC


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');