Displaying Relationship Records in Filament Table instead of Owner Model's resources

Hi, I'm having a problem with my custom Table display.
For ex: I have 2 Models: "Product" & "Order", which has belongsToMany to each other as their relationship, and using "OrderProduct" pivot model to store their pivot data.

I created the "OrderResource" as normal, and I want to display the list of OrderProduct in this Resource Table rather then the default Order model as usual, and why I click to the record, it will point me to the create/edit OrderResource. How can I archive this?

I have tried the $table->query(OrderProduct::query()) method, but as soon as I clicked on the record, it throw the error as Order Resources Form contained the relationship to the OrderProduct pivot model.

Hope you guys understand what i'm trying to say. Thank you!
Was this page helpful?