riccardogaleazzi
riccardogaleazzi
FFilament
Created by riccardogaleazzi on 7/27/2023 in #❓┊help
Nested relation
Hello, I have this structure: the order has multiple order items which are linked to a product table. Now in my orders list page I see all my orders and when I view one of them I use the repeater to show the ordered products. Since all the products info are on the products table how do I show them? I tried by calling the relationship name with the dot notation but none it's working.
Repeater::make('b2bOrderItems')
->relationship('b2bOrderItems')
->schema([
TextInput::make('sku'),
TextInput::make('product.description')
Repeater::make('b2bOrderItems')
->relationship('b2bOrderItems')
->schema([
TextInput::make('sku'),
TextInput::make('product.description')
The sku which is redundant on the order items table is working obviously, but the description is not. Thanks 🙂
6 replies