How to pass vlsue into Class importer

this action in my Resource How to pass with it value into importer Calss
No description
15 Replies
toeknee
toeknee2y ago
What type of value?
Alnuaimi
AlnuaimiOP2y ago
number ?
toeknee
toeknee2y ago
I am a little confused why you are wanting to pass an integer into the importer class.. Just set it in the class?
Alnuaimi
AlnuaimiOP2y ago
when click relation manger I wanaa pass value of record number for import it
toeknee
toeknee2y ago
I am not sure ImportAction has support for that yet, it's a very new feature.
Alnuaimi
AlnuaimiOP2y ago
No description
Alnuaimi
AlnuaimiOP2y ago
ok , How to pass value into class importer on action so I wanaa pass const ID number for all this records ?
toeknee
toeknee2y ago
I don't know.
Alnuaimi
AlnuaimiOP2y ago
Thanks brother
Patrick
Patrick2y ago
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
toeknee
toeknee2y ago
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
Patrick
Patrick2y ago
very nice, will try that out thanks!
Alnuaimi
AlnuaimiOP2y ago
Can use this code like this ?
No description
Alnuaimi
AlnuaimiOP2y ago
Wow it is very nice thanks brother

Did you find this page helpful?