How to get ownerRecord inside RecordImporter?
Lets setup 2 models. Event & People. The relationship is n to n.
Inside the edit component of the event resource i added a relation manager - PeopleRelationManager.
Now i started to configure the PeopleImporter so my users can import people into the event they are editing.
The question is, can I somehow get the ownerRecord so i can attach the people imported to the current event?
So far it works (the models are created), but the people arent attached to the event
this is how it looks so far:
now i'm trying to pass in somehow the id of the event, but idk how to retrieve it inside the PeopleImporter class:
5 Replies
bump
I've never tried Import, but if this "PeopleImporter" is a livewire then you may get using
mount()
not sure if it is, its a class that extends
vendor/filament/actions/src/Imports/Importer.php
im just following the docs
but not sure if what im trying to achieve is possible to achieve
bump ^^have you tried passing it as an option?
isnt there a section about importing relation managers
sorry for not updating the question, like half an hour i discovered it! yeah
now i do:
🙏 thanks
@Dan Harrin but im having an error and i dont undersand where it comes from - https://discord.com/channels/883083792112300104/1246023527019057193/1246023527019057193