F
Filamentβ€’2y ago
BKF Dev

Custom page url

Hi there ! I'm trying to set a parameter in a custom page url (see attached), but I'm getting an error : Missing required parameter for [Route: filament.pages.{$id}/feature] [URI: admin/{$id}/feature] [Missing parameter: $id]. What am I missing ?
15 Replies
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
BKF Dev
BKF DevOPβ€’2y ago
Thanks & not working
krekas
krekasβ€’2y ago
i think you should set route in method
Dan Harrin
Dan Harrinβ€’2y ago
$id is not the correct syntax inside route names should be {id}
BKF Dev
BKF DevOPβ€’2y ago
Oh yes !! loool you're right DAN /D Thanks hhh
Dan Harrin
Dan Harrinβ€’2y ago
you cant call php logic from inside a property definition
BKF Dev
BKF DevOPβ€’2y ago
But wait, it still not working with the same error :/ !!!! @Dan Harrin squint
Dan Harrin
Dan Harrinβ€’2y ago
this shouldnt be in the sidebar should it? so you $shouldRegisterNavigation = false
BKF Dev
BKF DevOPβ€’2y ago
Even true or false, same error !
Dan Harrin
Dan Harrinβ€’2y ago
where is the url being generated because it needs to pass in the id parameter
BKF Dev
BKF DevOPβ€’2y ago
I've set a static value as example, look the image above id=1
Dan Harrin
Dan Harrinβ€’2y ago
that doesnt matter not how laravel routes work it is not an optional parameter you may as well not have the parameter at all if youre not going to pass it in
BKF Dev
BKF DevOPβ€’2y ago
I fixed it thanks, protected static ?string $slug = '{id?}/feature'; πŸ‘ πŸ™‚
Dan Harrin
Dan Harrinβ€’2y ago
i dont understand the point but ok
BKF Dev
BKF DevOPβ€’2y ago
hhh as you said, I forgot to set it optional πŸ˜‚
Want results from more Discord servers?
Add your server