Attempted to lazy load [payment] on model [App\Models\Order] but lazy loading is disabled.
i have the following action in the OrderResource
as you can see im trying to pass the payment to that route
normally i would have
how can i achieve this in filament
Thank you
2 Replies
It's not really a Filament issue. You disabled lazy loading the relationships and then are accessing a relationship that isn't loaded yet. You can use
$order->load('payment')
in that caseYes you are correct I’ve disabled it to avoid n+1 queries
Thanks