From 9261470c75181b95caa74b49bae68cf46011eaf3 Mon Sep 17 00:00:00 2001 From: Venkatesh <116627677+venkat201-cpu@users.noreply.github.com> Date: Thu, 25 Sep 2025 12:48:49 +0530 Subject: [PATCH] Laravel Eloquent, the Builder class does not have a getLimit() method, so using getQuery()->limit (#17941) Fixes #17940 $query->getQuery() gives the underlying Illuminate\Database\Query\Builder object. That object does have a limit property that stores the LIMIT value of the query. --- packages/actions/src/Concerns/CanExportRecords.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/actions/src/Concerns/CanExportRecords.php b/packages/actions/src/Concerns/CanExportRecords.php index 4cf7a37072..469a330dfc 100644 --- a/packages/actions/src/Concerns/CanExportRecords.php +++ b/packages/actions/src/Concerns/CanExportRecords.php @@ -132,8 +132,8 @@ trait CanExportRecords $totalRows = $records ? $records->count() : $query->toBase()->getCountForPagination(); - if ((! $records) && $query->getLimit()) { - $totalRows = min($totalRows, $query->getLimit()); + if ((! $records) && $query->getQuery()->limit) { + $totalRows = min($totalRows, $query->getQuery()->limit); } $maxRows = $action->getMaxRows() ?? $totalRows;