AttachAction::make()
I have a MySQL table like this
id - source_model - related_module - related_model
in my Model i have a BelongsToMany like this
public function candidates(): BelongsToMany
{
return $this->BelongsToMany(Candidates::class, 'proposal_relations', 'source_model', 'related_model');
}
Tables\Actions\AttachAction::make()
->form(fn (AttachAction $action): array => [
$action->getRecordSelect(),
Forms\Components\TextInput::make('related_module')->required(),
])->preloadRecordSelect() now i want the value from the textinput 'related_module' stored in the tabele row 'related_module' please help......
->form(fn (AttachAction $action): array => [
$action->getRecordSelect(),
Forms\Components\TextInput::make('related_module')->required(),
])->preloadRecordSelect() now i want the value from the textinput 'related_module' stored in the tabele row 'related_module' please help......
2 Replies
doesnt it need to be in the withPivot() ?
πππ
Thanx