// the take
A standalone PHP router, installed with Composer as pecee/simple-router, that borrows Laravel's routing syntax: closure and controller callbacks, named routes, route groups with middleware and namespaces, and a pluggable CSRF verifier. It suits small PHP projects that want routing and input handling without a full framework.
- The extension points are interfaces (IMiddleware, IExceptionHandler, ITokenProvider, IClassLoader, IRouterBootManager), so the CSRF token store or class loader can be replaced, for example with php-di, without forking the router.
- Exception handlers merge through nested groups by default, and setting mergeExceptionHandlers to false lets a group opt out. The README documents this with a worked example, which is a deliberate design choice.
- The test directory covers middleware, groups, partial groups, resources, controllers, rewrites, URL generation and CSRF, and the repo includes a PHPStan config and a CI workflow. That is more verification than most small routers ship with.
- Trailing-slash handling for the last parameter is opt-in and documented, with the WebDAV file-versus-folder case as the motivating example. The Apache, Nginx and IIS rewrite configs are written out in full.
- The last push was November 2024, and the README still lists PHP 7.1 as the minimum, a version that has been end-of-life for years. Nothing in the README says it is tested on current PHP, so check that yourself before adopting it.
- The goal is stated as 'more or less 100% compatible' with Laravel's routing docs, but there is no list of where it differs. Anyone moving code over from Laravel will find the gaps by testing.
- Partial groups have a documented trap: url() cannot resolve routes inside a partial group until its prefix has matched. Code that builds links to plugin routes before the plugin is hit will fail silently.
- The default parameter pattern only accepts ASCII word characters and hyphens. Accented or non-Latin slugs need a defaultParameterRegex on every affected route or group, which is easy to miss in one place.
We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →