Optional path param for custom page

Hi everyone! I'm having trouble with a Filament page. I defined the {course?} parameter as optional in my route:
GET|HEAD admin/courses/{course?}/manage
GET|HEAD admin/courses/{course?}/manage
However, when I access the page without passing an ID, I get a 404 error. My mount method looks like this:
public function mount(?Course $course): void
{
$this->course = $course;
}
public function mount(?Course $course): void
{
$this->course = $course;
}
Is there something I'm missing to make the route work without the course parameter? Thanks for your help!
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server