Creating Multiple (Data) Records at Once in Relation Manager #15075
Unanswered
realknotworking
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package
Actions
Package Version
v3.2
How can we help you?
I have a working solution (below), but it seems hacky/inefficient. My goal is to create days using a DaysRelationManager; a user selects from three radio options what type/number of days they want to add:
Then when they submit the form, the appropriate days/dates are created in the database. The problem is it seems only possible to create a single data record through conventional means; I tried multiple ways of setting the $data array, nothing worked. My solution is to pull the first date from the $data, assign it as the $data['date'], and then submit the rest using the Day model:
Is there a more official/efficient way to do this in Filament?
Beta Was this translation helpful? Give feedback.
All reactions