RouteServiceProvider integration. This requires custom abstraction.UrlGenerator and Router are extensible but lack RFC-6570 support. This package could complement Laravel’s Route::get() or Route::param() by adding templated query-string generation.TemplatedUriService) to fit Laravel’s DI container and route registration.routes/web.php uses closure-based definitions, while this package expects YAML/array-based routes. A migration layer is needed to translate Laravel routes to the package’s format.url() helper.Str::of() or collect() + implode() achieve similar results with less overhead?TemplatedUriService in AppServiceProvider to expose the generator.TemplatedUri facade for fluent syntax (e.g., TemplatedUri::generate('route', ['page' => '{page}'])).Router with a templated() macro for route-specific templating./search{?q*,page}).url() + manual query-string building.Route collection to the package’s generator.// app/Services/TemplatedUriService.php
public function generate(string $routeName, array $params): string
{
$routes = $this->convertLaravelRoutesToPackageFormat();
$generator = new Rfc6570Generator($routes, new Context());
return $generator->generate($routeName, $params);
}
templated() method to Laravel’s Router or use route tags to auto-apply templating.Route::get('/search', function () {})->templated(['q', 'page', 'sort']);
Request and URL helpers for parsing generated links./products{?category*,page}) to validate the approach.How can I help you explore Laravel packages today?