Skip to content

Commit

Permalink
fixed export filter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CihanSenturk committed Oct 13, 2023
1 parent 3ce1f4a commit 0db420e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Utilities/Export.php
Expand Up @@ -22,6 +22,11 @@ public static function toExcel($class, $translation, $extension = 'xlsx')
try {
$file_name = Str::filename($translation) . '-' . time() . '.' . $extension;

//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();
}

if (should_queue()) {
$disk = 'temp';

Expand Down

0 comments on commit 0db420e

Please sign in to comment.