anyone?
Best practice?
So, I'm starting a new Laravel project for my company (Apple reseller) where I have to import lots of CSV files from different distributors, which include thousands of products. All these products need to be updated a few times everyday (in-stock counter, price, ...) with a cron job (task scheduler).
On a frontend I'm selecting product categories which I want to filter when importing these files. Also I have two buttons, one for exporting all filtered products to one CSV file for Shopware (e-commerce shop system), so I can import them once in that system, and the other button to manually update the products (again, in-stock count, price, etc.) in the external Shopware database.
When importing these CSV files, every distributor has his own "fields" (properties), so there also needs to be a schema or something like this where I can define which index of a CSV row represents which product property... and so on.
Now my question is: How would you structure the code of such a "complex" project to be as simple and fast as possible (in terms of runtime for thousands of datasets), what is the best approach in a situation like this? I would like to programatically add distributors in the future, and don't worry about the individual functionalities (Interface?).
I've already coded something before which works, but sadly didn't come up to my expectations, so I need a little help to completely refactor my horrible first try.
There has to be an elegant way.
Thank you for your help. :)
Please or to participate in this conversation.