Since I'm mostly using SvelteKit and PocketBase, this Router is no longer maintained. Maybe when I'm getting bored, I'll fix / improve one or two things.
- Dependency-free
- MVC
- No Models included, but you use PDO with the Query class
- Easy to use readable URLs like
/u/:name
instead of things likeuser.php?name=
# Remove composer things
rm -rf composer* vendor/ .phpstan.neon .vscode/tasks.json
# Remove docker things
rm docker-compose.yml Caddyfile
# Clone git repo
git clone git@github.com:felix-schindler/Router.git && cd Router
# Run dev server
php -S localhost:8080 -t src/
# or
composer run dev
# OPTIONAL - Install testing dependencies
composer i
# Run unit tests and static code analysis
composer run test
docker compose up
Make sure your web server:
- Supports PHP
- Serves files
- Routes through index.php (if the path doesn't match a file)
Tested on: Apache, Nginx, Caddy