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()]);
})
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()]);
})
Solution
Solved:
->modifyQueryUsing(function ($query) {
return $query->with(['campaign' => function ($query) {
$query->withTrashed()->with(['user']);
}]);
})
->modifyQueryUsing(function ($query) {
return $query->with(['campaign' => function ($query) {
$query->withTrashed()->with(['user']);
}]);
})