kiss-php / router
This is a KISS router and I try to keep it simple.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/kiss-php/router
This package is not auto-updated.
Last update: 2025-10-08 22:37:26 UTC
README
Requirements:
- PHP >7.4
- Composer (vendor autoload)
To install you execute:
composer install ...
To start to use add the routes in your index.php file.
require 'vendor/autoload.php'; use Kiss\Http\Router; Router::use('', 'Agrandesr\EasyRouter\Controllers\User'); //Function default main Router::use('get','Agrandesr\EasyRouter\Controllers\User::get'); Router::use('update','Agrandesr\EasyRouter\Controllers\User::update');
If you want to create relative path you can use brackets.
Router::use('update/{id}','Agrandesr\EasyRouter\Controllers\User::update');
Next, you can use this relative path with the static function getOption.
$id = Router::getOption('id');