Wallogit.com
2017 © Pedro Peláez
A simple router for LPFC
A simple router for Light PHP Framework based on Composer (LPFC), which is under the MIT License, (*1)
install by composer, (*2)
Remember to use Route::dispatch(); after all routes registered, (*3)
main referrence: NoahBuscher's Macaw, (*4)
Edit your composer.json, add require like:, (*5)
"require": {
"phonicavi/lpfc-router": "dev-master"
}
then run composer-update under the root directory:, (*6)
composer update, (*7)
All finished.., (*8)
Please download the file package and unzip it,
move them to ./vendor/phonicavi/lpfc-router/ in which ./ is just the root directory of your PHP works., (*9)
add that below in your route-configuration file:, (*10)
use LPFCRouter\Hermes\Route;
since the namespace LPFCRouter\\Hermes\\ defined by lpfc-router, (*11)
Since native function __callstatic() used, you can register your routes with simple forms like, (*12)
Route::get()
or, (*13)
Route::post()
more details need to be added, (*14)