->chunk(10, function($student_spreadsheet) use (&$current_row, &$errors, &$successful_rows, &$remove)
I was using 2.0.9, as soon as I updated to ~2.1.0 all of the referenced variables in the closure are getting ignored, as in they stay at the initial value. I don't quite get why..
This is the full code:
Excel::filter('chunk')->selectSheetsByIndex(0)->load('storage/app/processed_files/'.$target_filename, 'UTF-8', true)->noHeading()->formatDates(FALSE)
->chunk(10, function($student_spreadsheet) use (&$current_row, &$errors, &$successful_rows, &$remove)
When using chunk, you are executing every chunk sandboxed, because the chunk is put on the queue (when no queue driver used, it uses the laravel sync driver). This means it's not possible to pass variables by reference.
This feature was added to 2.1.0 to tackle performance issues. The 3rd parameter of chunk() accepts a boolean to enable/disable this functionality.
hi i am larage values store in one array how to down csv down load chunk by chunk
please any one help with. need to google api big data
Most helpful comment
When using chunk, you are executing every chunk sandboxed, because the chunk is put on the queue (when no queue driver used, it uses the laravel sync driver). This means it's not possible to pass variables by reference.
This feature was added to 2.1.0 to tackle performance issues. The 3rd parameter of
chunk()accepts a boolean to enable/disable this functionality.