Skip to content

Commit

Permalink
Merge pull request #121 from diegobas/inject-livewire-modifyqueryusing
Browse files Browse the repository at this point in the history
Inject $livewire and $tableQuery to modifyQueryUsing
  • Loading branch information
pxlrbt committed Dec 14, 2023
2 parents 73ffcc0 + a86f0c9 commit 3df9257
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Exports/ExcelExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ public function getQuery()
: $this->getModelClass()::query();

if ($this->modifyQueryUsing) {
$query = $this->modifyQueryUsing->getClosure()($query);
$query = app()->call($this->modifyQueryUsing->getClosure(), [
'query' => $query,
'livewire' => $livewire,
]);
}

return $this->query = $query
Expand Down

0 comments on commit 3df9257

Please sign in to comment.