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

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;
}

Is there something I'm missing to make the route work without the course parameter?
Thanks for your help!
optional-route-param.png
Was this page helpful?