© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
Aditya Khadka | Nepal

Show orderitems associated with orders

I'm currently working on a project where I have two main models: Order and OrderItem, with Order containing many OrderItems. In the Filament admin panel, I'm trying to implement a feature within the Order resource where I can click an action button for an order to view all its associated order items in a table.

I attempted to create a custom action in the Order resource to achieve this, hoping to navigate to a view or page where I see a table listing all the OrderItems associated with that specific Order. Here's the code snippet I've used:

use Filament\Pages\Actions\Action;

Action::make('view Order Id')
->url(fn (): string => OrderItemResource::getUrl('view', ['record' => $this->order->id]));
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

How to show associated attachment model images in forms?
FilamentFFilament / ❓┊help
3y ago
show changes with vite
FilamentFFilament / ❓┊help
3y ago
Preventing Automatic Record Creation in Associated Table with BelongsToMany Relationship
FilamentFFilament / ❓┊help
3y ago
Display two associated models on Edit?
FilamentFFilament / ❓┊help
3y ago