Passing parameters to a custom page
Hello all,
could anyone please help me with passing parameters to a custom page (not associated with any resource)?
I am doing something wrong here?
This works when I accept the parameter in livewire style but the filament shows the Admin panel's menu when I send the parameter.
/trainer/attendee-sheet/12 -> This page shows the admin panel's navigation.
/trainer/attendee-sheet -> This page shows correct navigation.
4 Replies
Solution
worked using this,
How do you get it not to generate a Route name like this:
GET|HEAD admin/customer/{id} filament.admin.pages.customer.{id}
Ok the error is due to as I had it registered for navigation and it requires an id in the url. I removed it from the navigation component with "protected static bool $shouldRegisterNavigation = false;" Now it works.
Hi @Sanchit Patil ... I am encountering similar challenge. But I could not understand your solution. My Filament Custom Page always shows Admin panel selective navigation in both public and private view. It is not working for me using parameter. Would you mind elaboring where to use getSlug().
are you getting this issue due to the custom page?
because I got this issue while trying to pass a parameter to the custom page URL.
first, i tried the way we do it with Livewire full-page component
php
this works but, the filament started showing the Admin panel's menu when I sent the parameter (the page is not associated with the admin panel).
so tried it in the getSlug function and accessed in the mount function and it worked.