-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Describe the bug
When I have a resource route that has a dash in the name, route/model binding gets broken and an error "Missing required parameter for [Route....]"
What version does this affect?
- Laravel Version: 9.38
- Package Version: 1.6.0
To Reproduce
Setup a simple Resource Controller using Resource Breadcrumbs. Ex:
Route::resource('some-route', SomeRouteController::class)->breadcrumbs(function(ResourceBreadcrumbs $breadcrumbs) {
$breadcrumbs->index('Index Rte')->show('Show Rte')->edit('Edit Rte');
}
When trying to visit the Edit or Show routes and you will get the missing required parameter error.
Changing the - to an underscore will correct the error. Separating the resource route into individual routes will also correct the error.
Expected behavior
I use dashes in my route names on a regular basis as they are easy to read and match up with Laravel's slug method