How to pass vlsue into Class importer
this action in my Resource How to pass with it value into importer Calss
15 Replies
What type of value?
number
?
I am a little confused why you are wanting to pass an integer into the importer class.. Just set it in the class?
when click relation manger I wanaa pass value of record number for import it
I am not sure ImportAction has support for that yet, it's a very new feature.
ok , How to pass value into class importer on action so I wanaa pass const ID number for all this records ?
I don't know.
Thanks brother
https://filamentphp.com/docs/3.x/actions/prebuilt-actions/import#using-import-options
And possibly see if you can pass in this relationship id?
im running into this right now
I have an Event (model), which have Invitees. Invitees is shown via relationsmanager. Now when adding this CSV import it does not know about event it should be applied to
Had a chat with Dan,
Use
->options(['owner' => $this->getOwnerRecord()->getKey()])
and then you can just use a hook in the importer to associate the owner
very nice, will try that out
thanks!
Can use this code like this ?
Wow it is very nice thanks brother