© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
vas

Attempted to lazy load [payment] on model [App\Models\Order] but lazy loading is disabled.

i have the following action in the OrderResource

                Tables\Actions\Action::make('Download Factura')
                    ->icon('heroicon-o-credit-card')
                    ->color('indigo')
                    ->hidden(fn (Order $order) => $order->payment->status != PaymentStatusEnum::PAID->value)
                    ->url(fn (Order $order) => route('stripe.retrieve.invoice', $order->payment))
                    ->openUrlInNewTab(),
                Tables\Actions\Action::make('Download Factura')
                    ->icon('heroicon-o-credit-card')
                    ->color('indigo')
                    ->hidden(fn (Order $order) => $order->payment->status != PaymentStatusEnum::PAID->value)
                    ->url(fn (Order $order) => route('stripe.retrieve.invoice', $order->payment))
                    ->openUrlInNewTab(),


Route::get('/stripe/retrieve_invoice/{payment}', 'App\Http\Controllers\StripeController@retrieve_invoice')->name('stripe.retrieve.invoice');
Route::get('/stripe/retrieve_invoice/{payment}', 'App\Http\Controllers\StripeController@retrieve_invoice')->name('stripe.retrieve.invoice');


as you can see im trying to pass the payment to that route
normally i would have
Order::with('payment')
Order::with('payment')

how can i achieve this in filament
Thank you
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

RelationManager with lazy loading disabled
FilamentFFilament / ❓┊help
2y ago
Call to undefined method App\Models\Order::order_id()
FilamentFFilament / ❓┊help
2y ago
Lazy loading on FileUpload
FilamentFFilament / ❓┊help
2y ago