I need to import datas from a CSV given by the client.
I cant import raw datas, I need to do some operation before importing, for example saving a relation between a product and a category whereas the category in the CSV is an integer (so I need to search for the corresponding category, and save it as a relation to the product I import).
So be simple, I need the power of PHP / laravel to manipulate my datas before creating the corresponding tailor models, how can I do that ?
@artistro08 but this method will also be triggered when you add a new model using the backend isn’t it ? I’m not sure if I have the necessary conditions to check if the model is created using an import or using the backend form
I finally created a “true” plugin to handle import exactly as I want, but it’s true that some hooks to be able to modify the $data array before importing model would be a great addition to tailor.