Customizing route parameter names and urls
I have an
EditREcord
resource that I'd like to have accept a parameter, location
, but it only seems to want to accept a parameter called record
.
In my main Resource class I have this:
and then in my EditLocation
class I've done essentially copied the mount method from the EditRecord
class so that I can pass in a variable named $location
.
I'm sure this isn't right to begin with, hopefully someone can clue me in on the right way to do this. I'm getting the error:
Missing required parameter for [Route: filament.app.resources.locations.edit] [URI: team/{tenant}/locations/{location}/edit] [Missing parameter: location].
5 Replies
Following.... facing the same issue
bump
Same issue here. Have you found a solution?
no I haven't been able to resolve it.
I don't have a complete answer, but ... I wonder if you might have to override the
routes()
method on the page, for it to recognize the additional named parameters?
https://github.com/filamentphp/filament/blob/941919e8ff96129c96caa5c8db9f9cc3b89c2bf7/packages/panels/src/Pages/Concerns/HasRoutes.php#L23-L38GitHub
filament/packages/panels/src/Pages/Concerns/HasRoutes.php at 941919...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament