sette
sette
FFilament
Created by sette on 4/30/2024 in #❓┊help
Multiple Select with relationship in Builder Block is not working
Hi guys! I was wondering if the Select with many to many relationship should work, without any special configuration, inside a builder block, because it's not saving the relation in the connection table. Here is the code:
Builder\Block::make('audio')
->schema([
// …

Select::make('voice_id')
->searchable()
->multiple()
->relationship('voices', 'last_name')
->createOptionForm([
Forms\Components\Grid::make(2)
->schema([
Forms\Components\TextInput::make('first_name')
->required(),

Forms\Components\TextInput::make('last_name')
->required(),
])
]),
])
Builder\Block::make('audio')
->schema([
// …

Select::make('voice_id')
->searchable()
->multiple()
->relationship('voices', 'last_name')
->createOptionForm([
Forms\Components\Grid::make(2)
->schema([
Forms\Components\TextInput::make('first_name')
->required(),

Forms\Components\TextInput::make('last_name')
->required(),
])
]),
])
I would really appreciate some help as I'm stuck here! Thank you!!
2 replies