bypikod/php-router

Simple router library with PHP

1.0.0 2023-11-10 13:55 UTC

This package is auto-updated.

Last update: 2024-09-16 16:28:26 UTC


README

License Maintaned Commits Forks Stars Watchers

Simple PHP router library for routing.

Warning

Minimum PHP version for this package is PHP7.

Installation

Add this package to your project with composer:

composer require bypikod/php-router

Note

This project is designed to be used with Apache. You can find a sample ".htaccess" file here.

Getting Started

use PHPRouter\Router;

$router = new Router();
$router->route('/', function () {
    echo "Hello World";
});

$router->run();

Contribute

Contributers are welcome! Just make sure you understand the follow the rules below:

  • Contributions must follow the PSR-2 coding standard.
  • Make sure you're writing documentation that covers your code changes.
  • Follow the Code of Conduct.

And you should know your submissions will be under MIT License.

License

This project is licensed under the terms of the MIT License.

You are free to use this project in compliance with the MIT License. If you decide to use, modify, or redistribute this software, you must include a copy of the original license and copyright notice in all copies or substantial portions of the software.

For more information about the MIT License, visit: MIT License.