Skip to content

Commit

Permalink
Fix queue export
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed Dec 23, 2024
1 parent 361a4fe commit 0d6dee4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DataSource/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ public static function make(

public function filter(): EloquentBuilder|QueryBuilder
{
// To make it work on export, we need to use ->filters instead of filters()
$filters = collect(
app()->runningInConsole()
app()->runningInConsole() && !app()->runningUnitTests()
? $this->component->filters
: $this->component->filters()
);
Expand Down Expand Up @@ -227,7 +228,7 @@ private function filterNestedRelation(string $table, array $columns, string $sea
});
}
} catch (RelationNotFoundException $e) {
$query->leftJoin($nestedTable, "$table.$nestedTable" . "_id", '=', "$nestedTable.id")
$query->leftJoin($nestedTable, "$table.$nestedTable" . '_id', '=', "$nestedTable.id")
->orWhere(function (EloquentBuilder $query) use ($nestedTable, $nestedColumns, $search) {
foreach ($nestedColumns as $nestedColumn) {
$search = $this->getBeforeSearchMethod($nestedColumn, $search);
Expand Down

0 comments on commit 0d6dee4

Please sign in to comment.