jms/object-routing
jms/object-routing is a PHP library for routing based on object state rather than URLs. Define routes and generate targets by evaluating objects and their metadata, enabling flexible navigation and link generation in domain-driven apps.
users/{id}, products/{id}/reviews).posts/{id}/comments/{id})./login, /dashboard) with no dynamic object relationships.Route::resource(), API resource controllers) or packages like spatie/laravel-api-resources already meet your needs with better maintenance.For Executives:
"This package automates API route generation based on our application’s object models, cutting development time for CRUD operations and nested resources by ~30%. For example, instead of manually defining routes for users/{id}/orders/{id}, we’d let the system derive them from our User and Order classes. This aligns with our goal to [reduce tech debt/accelerate feature delivery] while maintaining flexibility for future data model changes. The trade-off is minimal upfront effort for long-term maintainability, though we’d need to validate its compatibility with our stack during a proof-of-concept."
For Engineering: *"The jms/object-routing library generates Laravel routes dynamically from object properties, which could simplify our current [manual route definitions/custom API layer]. Key benefits:
index, store, show for any Eloquent model).Product field updates its URL path).spatie/laravel-api-resources] for similar gains with active maintenance.
Recommendation: Spin up a POC with our [highest-priority dynamic route use case] to compare dev effort vs. control. If viable, propose a phased rollout starting with non-critical endpoints."*How can I help you explore Laravel packages today?