Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Simple Router

Simple Router Laravel Package

developermarius/simple-router

A lightweight, easy-to-use router for Laravel and PHP applications. Define clean routes with minimal configuration, map URLs to controllers or closures, and keep setup simple—ideal for small projects or developers who want straightforward routing without extra complexity.

View on GitHub
Deep Wiki
Context7

Simple Router is a lightweight routing package for Laravel/PHP applications that keeps route definitions clean and readable. It offers a straightforward API for mapping URLs to controllers or closures, helping you organise endpoints without unnecessary boilerplate.

  • Expressive route definitions for GET, POST and other HTTP verbs
  • Route groups and prefixes for related endpoints
  • Middleware support for request filtering and authentication
  • Named routes and parameter handling for maintainable links
  • Framework-friendly integration that stays out of your way
Frequently asked questions about Simple Router
Is developermarius/simple-router a drop-in replacement for Laravel's router?
No. It is a standalone, framework-agnostic PHP router that borrows Laravel's routing syntax, not a replacement for Laravel's Route facade. In a Laravel app you would bypass container-aware middleware, route model binding, signed URLs, throttling, and route caching. Use it where Laravel is disproportionate, such as a small PHP service or legacy codebase.
How do I install developermarius/simple-router with Composer?
Install it as a Composer package with composer require developermarius/simple-router. The overview describes a small public surface and a recent 2025 release, so integration is straightforward for a standalone PHP entry point. Check the repository for the supported PHP version matrix and required autoload setup before deploying.
Does simple-router support route parameters, HTTP verbs, and route groups?
Yes. The package is described as borrowing Laravel's routing ergonomics, including verb methods, route parameters, and groups. That gives developers familiar, readable route definitions without pulling in the full Laravel framework. Verify exact syntax and edge cases against the repository documentation.
Can I use simple-router inside an existing Laravel application?
It is not recommended. Adding a second router to a Laravel process means bypassing Laravel's own routing layer and reconciling two sets of middleware, dispatch, and URL generation behavior. The package fits adjacent to Laravel, not inside it. For a Laravel app, use Laravel's router.
Is developermarius/simple-router PSR-7 or PSR-15 compatible?
The provided overview does not establish PSR-7 or PSR-15 interoperability. You need to confirm whether dispatch returns a response object or emits headers and output directly, and how middleware is registered and ordered. If it is not PSR-15 aware, plan for a hand-written adapter that becomes a maintenance surface.
What kind of projects is simple-router best suited for?
It fits greenfield microservices, internal APIs, BFF or edge services, and legacy or modular PHP codebases that need incremental structure. These are cases where installing Laravel is disproportionate but the team wants familiar Laravel-shaped routing syntax. It is a poor fit for the main Laravel application.
How does simple-router handle 404 versus 405 responses and middleware ordering?
The overview does not document 404 versus 405 disambiguation or middleware ordering semantics. These details matter because they affect API correctness and debuggability. Inspect the source, tests, and examples, or write characterization tests before exposing the router to clients.
Does simple-router support route caching or compilation for performance?
The description does not state whether routes are compiled or cached rather than matched per request. Without route caching, per-request matching may produce a latency regression compared with a cached framework router. Ask for published benchmarks against Laravel, Symfony, and FastRoute before relying on it for high-traffic services.
Is simple-router safe and mature enough for production?
Treat it as promising but unproven. It has a recent release and active stewardship, but a single maintainer, very few stars, and zero dependents mean little downstream production evidence. Routing handles untrusted input, so review the test suite, regex matching for ReDoS exposure, path normalization, method handling, and the security disclosure policy first.
What are alternatives to developermarius/simple-router for PHP routing?
Common alternatives include FastRoute, Symfony Routing, Slim's router, and Laravel's router when you are already on Laravel. Choose based on PSR-7/PSR-15 interoperability, middleware model, route caching, and maintenance history. Simple-router's advantage is Laravel-like syntax in a small standalone package.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core