emil
Injecting $record and using ->when
Apply certain styling (say color) based on the $record and using Enum at the same time.
I know I can inject $record in ->color - however the state column is an Enum and has the colors defined there. Just want to override it based on record conditions
17 replies
Soft-deleted relations
Well, it behaves strange.
campaign.user.email
campaign = soft deleted
user = not soft deleted
Only works when both of these relations are withTrashed.
'campaign' => fn ($query) => $query->withTrashed(),
'campaign.user' => fn ($query) => $query->withTrashed(),
Maybe that's expected behaviour? I'd imagine the second one alone should be enough
7 replies
Soft-deleted relations
Appears nested relations are not passed through modifyQueryUsing?
Appears to be a bug, no?
TextColumn::make('campaign.user.email')
->modifyQueryUsing(function ($query) {
return $query->with([
'campaign' => function ($query) {
$query->withTrashed()->with('user');
},
]);
})
7 replies
formEvents gone in 3.0?
Not getting it to work so I assume the foremost unfortunately.
Perhaps another approach is recommended with Filament 3?
I have a JS variable in a form components custom view that I want to "send to" the main Filament component
7 replies