https://github.com/ppeco/routepp
Simple library for route pages
https://github.com/ppeco/routepp
php-router ppeco router
Last synced: 6 months ago
JSON representation
Simple library for route pages
- Host: GitHub
- URL: https://github.com/ppeco/routepp
- Owner: ppeco
- License: mit
- Created: 2021-08-07T11:55:59.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-13T15:47:43.000Z (almost 5 years ago)
- Last Synced: 2025-08-13T19:36:30.032Z (11 months ago)
- Topics: php-router, ppeco, router
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RoutePP
```shell
composer require ppeco/routepp
```
Simple library for route pages
## Example
```php
use ppeco\router\Router;
Router::route("/", function() {
return "Hello, world!";
});
Router::route("/user/(\d+)", function(array ...$data) {
return "User #$data[1]";
});
Router::route("/simple", function() {
return "This is simple pages";
});
echo "Page not found";
```