F
Filament11mo ago
Pritbor

Polymorphic N:N issue with Form

I have Address model sharing MorphToMany relations with Buyer and Seller models. I am struggling to create an address for the Buyer or Seller using the Filament form in BuyerResource or SellerResource. I have attached my relationship method and migration file code for Address and related models. I would like to create address for Seller or Buyer using form while creating new seller or buyer in SellerResource. Below is one of the method I am trying in the form i tried:
Forms\Components\TextInput::make('addressable')
->relationship('addresses', 'address_line1'),
Forms\Components\TextInput::make('addressable')
->relationship('addresses', 'address_line1'),
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server