skip to Main Content

I m working on a platform and i’m stuck with few issues, please help me out.

I have built a Laravel application(Kind of ecommerce), where users will log in to our store and selects the products they want to sell in their platform(Shopify, Magento, Zencart etc.) add them to their catalog/cart. the users can add up to 15-20K products at a time to sell in their platform.

In their catalog, they have an option o export these product’s details in a csv file, but it’s taking to much load and end with crashing the browser. is there any way to tackle this issue? instead of loading the data over browser, can we anyhow create the CSV file in the backend of the servers and once its ready we can link it up?

Thank you all!

2

Answers


  1. You can separate your export logic into a queued job.
    Read more about here.

    You don’t need event-listener at this time, Job is quite enough.

    After you made a Job, dispatch it from the controller, and send a response to the user.

    In the Job, save your file in your storage (locally or cloud, as you want), and send a notification (maybe an email) with the link to the user if you job is done.

    Login or Signup to reply.
  2. I’ve recently used package that manages importing and exporting data from or to excel. THe best part of this package is that it supports also exporting in other formats

    Check out https://docs.laravel-excel.com/3.1/getting-started/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search