parse uploaded CSV prior to Import
I’m playing around with Import Actions and I’m trying to initially parse the uploaded CSV file prior/after calling importer()
I’m doing so to remove multiple rows of bad data that’s included in the CSV from source. If I don’t do this - my users would have to and it gets messy.
How do I grab the uploaded file in this case?
request() ???
5 Replies
You can use
updateOrCreate()
if you have unique column in your tableIt needs to be prior to ImportColumn::make()
I am attempting to clean up the CSV so that each instance of ImportColumn::make() is valid
Okay, implement it with lifecycle hooks
Even when attempting that - I need to clean up the CSV prior to- essentially as soon as the file is uploaded