emil
InteractsWithRecord + Clusters = Not possible?
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:
On the Page class, I define this:
php artisan route:list declares this:
View looks like this
I get the error:
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?
13 replies
Soft-deleted relations
Found other posts before but no answers.
Works when campaign is soft-deleted:
TextColumn::make('campaign.user.name')
However, this doesn't work:
->url(fn ($record) => UserResource::getUrl('edit', [$record->campaign->user]))
modifyQueryUsing is eager loading it - however that doesn't seem to affect $record.
Query being run:
select * from
campaigns
where campaigns
.id
in (5) and campaigns
.deleted_at
is null
Modify query on the table:
->modifyQueryUsing(function ($query) {
return $query->with(['campaign' => function ($query) {
$query->withTrashed()->with(['user']);
}]);
})7 replies
Soft-deleted relations
Found other posts before but no answers.
TextColumn::make('campaign.user.name')
What is the campaign is soft deleted?
modifyQueryUsing doesn't seem to do anything (checked with query debugger)
->modifyQueryUsing(function ($query) {
return $query->with(['campaign' => fn($query) => $query->withTrashed()]);
})
4 replies
Register Page in navigation
I feel utterly stupid.. I have a page (EditRecord) in my resource, and want this page to be displayed in the main navigation.
Whatever I try - all from registering it as a Page in the provider, to sub navigation in the resource, it won't appear in the sidebar.
What part of the docs am I missing?
2 replies
Just bought Filament's Minimal Theme - with the hopes it would be "stable" for current Filament.
Followed the install instructions, cleared cache, rebuilt npm etc. Part of the app looks like the new theme, whereas other parts such as wizards appear broken.
https://share.cleanshot.com/nQVV3zmd
7 replies