fixed export sheets array key issue

This commit is contained in:
Cihan Şentürk 2023-12-25 13:57:32 +03:00 committed by GitHub
parent 949adb406d
commit 9e3af389fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Export
//Todo: This improvement solves the filter issue on multiple excel sheets. This solution is a temporary solution.
if (empty($class->ids) && method_exists($class, 'sheets') && is_array($sheets = $class->sheets())) {
$class->ids = (new $sheets[0])->collection()->pluck('id')->toArray();
$class->ids = (new $sheets[array_key_first($sheets)])->collection()->pluck('id')->toArray();
}
if (should_queue()) {