Pass Calling Model on ImportAction from Relation Manager

HI all, Is there a way to pass which ModelId called the Import Action We have a Group Model and we want to know the group_id that the import action was called from in order to save it to a database record?
Solution:
Hi @cvc . How about using options method like below? ``` ->headerActions([ Tables\Actions\ImportAction::make()...
Jump to solution
2 Replies
Solution
oka
oka9mo ago
Hi @cvc . How about using options method like below?
->headerActions([
Tables\Actions\ImportAction::make()
->importer(GroupImporter::class)
->options([
'group' => $this->getRecord()
])
])
->headerActions([
Tables\Actions\ImportAction::make()
->importer(GroupImporter::class)
->options([
'group' => $this->getRecord()
])
])
I'm sorry if this answer isn't fit you or you already solved this issue.
nostrodamned
nostrodamnedOP9mo ago
Doh!! perfect thanks!
Want results from more Discord servers?
Add your server