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β’2y ago
Message Not Public
Sign In & Join Server To View
Thanks & not working
i think you should set route in method
$id is not the correct syntax inside route names
should be {id}
Oh yes !! loool you're right DAN /D
Thanks hhh
you cant call php logic from inside a property definition
But wait, it still not working with the same error :/ !!!!
@Dan Harrin
this shouldnt be in the sidebar should it?
so you $shouldRegisterNavigation = false
Even true or false, same error !
where is the url being generated
because it needs to pass in the id parameter
I've set a static value as example, look the image above id=1
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
I fixed it thanks,
protected static ?string $slug = '{id?}/feature';
π πi dont understand the point but ok
hhh as you said, I forgot to set it optional π