F
Filament4mo ago
cvc

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
oka4mo 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.
cvc
cvc4mo ago
Doh!! perfect thanks!