Using custom Filament page (\Filament\Pages)
Page is within a Cluster.
What I want to achieve:
Having user/{tenant}/cluster/{model}/page work - working with a specific record in a custom Page, where the Page is inside a Cluster.
On the Cluster class, I define slug:
protected static ?string $slug = 'cluster';
On the Page class, I define this:
use InteractsWithRecord;
public Service $service;
public static function getRoutePath(): string
{
return '{service}/page';
}
public function mount(Service $service): void
{
$this->service = $service;
}
php artisan route:list declares this:
GET|HEAD user/{tenant}/cluster/{service}/page
View looks like this
<x-filament-panels::page>
{{ $this->form }}
</x-filament-panels::page>
I get the error:
Missing required parameter for [Route: filament.user.cluster.pages.{service}.page] [URI: user/{tenant}/cluster/{service}/page] [Missing parameter: service].
If I set getSubNavigation to return an empty array (the breadcrumbs), I get the page to render.
What am I missing - feels like I'm over-complicating this?