Closed rahmanramsi closed 1 year ago
Thanks for the issue! But I don't think it's something "wrong" with Filament, because this is how Eloquent behaves when you try to eagle-load something twice. Not really something we can fix in our own code.
However, I understand why withTrashed()
would be useful. So I propose that you add a scopeRelationshipUsing()
method to the Column which could enable this behaviour by accepting a $query
callback. A PR would be great!
Package
filament/tables
Package Version
v2.16.62
Laravel Version
v9.48.0
Livewire Version
v2.11.0
PHP Version
PHP 8.1.14
Problem description
When manually eager load a relation
And then show it on column
A relation that manually eager load before get replaced by Filament.
Author relation with trashed get retrieved
Expected behavior
Author relation with trashed get retrieved
Steps to reproduce
Reproduction repository
https://github.com/rahmanramsi/filament-eagerload
Relevant log output
No response