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......
2 Replies
Dan Harrin
Dan Harrinβ€’2y ago
doesnt it need to be in the withPivot() ?
MartinKnops
MartinKnopsβ€’2y ago
πŸ‘πŸ‘πŸ‘ Thanx
Want results from more Discord servers?
Add your server