From 3d812b49f61c79274b029da547e2e291c3b7e3f6 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 10 Oct 2024 14:24:02 +0800 Subject: [PATCH] Use `lazy()` instead of `cursor()` Signed-off-by: Mior Muhammad Zaki --- src/Jobs/QueuedExportAsCsv.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jobs/QueuedExportAsCsv.php b/src/Jobs/QueuedExportAsCsv.php index 92055c7..fa44e3d 100644 --- a/src/Jobs/QueuedExportAsCsv.php +++ b/src/Jobs/QueuedExportAsCsv.php @@ -79,7 +79,7 @@ public function handle() $query = unserialize($this->query); $eloquentGenerator = function () use ($query) { - foreach ($query->cursor() as $model) { + foreach ($query->lazy() as $model) { yield $model; } };