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
Routing Bundle

Routing Bundle Laravel Package

symkit/routing-bundle

SymKit Routing Bundle gives PHP applications a cleaner way to define, organize, and maintain routes. It simplifies route registration and management while staying lightweight, cache-friendly, and easy to integrate into existing projects. Ideal for teams that want predictable URL handling without ext...

View on GitHub
Deep Wiki
Context7

Dynamic database-driven routing for Symfony. Manage routes in the database with native performance via Symfony's routing cache.

Frequently asked questions about Routing Bundle
What is SymKit Routing Bundle and what problem does it solve?
SymKit Routing Bundle is a Symfony bundle that lets you define and manage application routes in a database instead of only in YAML files or PHP attributes. Routes become data, so they can be created, edited, or removed at runtime while still resolving through Symfony's native routing cache in production. It targets teams that need flexible URL handling without bolting a heavy routing layer onto the framework.
How do I install symkit/routing-bundle?
Install it with Composer by running composer require symkit/routing-bundle. Because it ships as a Symfony bundle, you then register it in config/bundles.php in Symfony Flex applications. The repository README on GitHub is the authoritative source for any extra configuration or migration steps.
Does database-driven routing slow down my Symfony app?
Not in normal production use, because the bundle relies on Symfony's routing cache: routes are read from the database and compiled into cached PHP. Incoming requests are matched against that compiled cache rather than hitting the database on every page view. The real cost is warming or regenerating the cache after routes change.
How do I clear the routing cache after changing a route in the database?
Run php bin/console cache:clear, or cache:warmup as part of your deploy, whenever a route is added, edited, or deleted. Since routes are compiled into the routing cache, direct database edits will not appear until that cache is rebuilt. If route changes happen often, add a small listener or command that clears the routing cache when the underlying data changes.
Can I use symkit/routing-bundle in a Laravel application?
No. This is a Symfony bundle built on Symfony's routing component, kernel, and cache, so it will not run inside a Laravel app. Laravel has its own router, and dynamic URLs there are usually handled with route models or custom route registrars and service providers. The bundle only makes sense on a Symfony codebase.
Do I still need YAML or attribute routes if I use this bundle?
You can use it alongside Symfony's standard routing rather than instead of it. Static endpoints such as admin pages or APIs can stay in YAML or attributes, while content, tenant, or marketing URLs live in the database. Both sources feed the same compiled route collection, so matching stays consistent.
Which Symfony versions does symkit/routing-bundle support?
Support depends on the constraints declared in the bundle's composer.json, so check that file along with the release notes and tags on GitHub before installing. Symfony's routing and cache APIs have shifted across major versions, so pick a bundle release that matches your framework version. Running composer require in a staging copy of your app is the fastest way to confirm compatibility.
How do I test routes that are stored in the database?
Seed the routes table in your test database, rebuild the routing cache during test bootstrap, then make functional requests against the generated URLs and assert status codes and content. Keep fixtures explicit so route order and parameter requirements stay deterministic. Clear the cache between tests whenever route fixtures change.
Is SymKit Routing Bundle safe to use in production?
It is designed for production use, since routes compile into Symfony's routing cache and matching adds no per-request database queries. Before shipping, review the repository's recent commits, open issues, and release history to judge maintenance activity, and pin an exact version in composer.json. As with any community package, read the code and test your own routing scenarios.
How does it compare with other dynamic routing solutions for Symfony?
The appeal here is staying native: routes resolve through Symfony's own router and cache instead of a replacement routing layer, which keeps the bundle lightweight and easy to drop into existing projects. When comparing candidates, look at how they store routes, whether they compile to the routing cache, and how much of Symfony's routing API they override. If you only have a handful of static routes, plain YAML or attribute routing is simpler and needs no extra 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.
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
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect