Skip to content

Commit 8aa0c53

Browse files
bdelamatreactions-user
authored andcommitted
Fix styling
1 parent ba141e1 commit 8aa0c53

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Traits/WithFilters.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function getFilterOptions(string $filter): array
195195
*/
196196
public function getSearchableColumns() : array
197197
{
198-
return array_filter($this->columns(), function(Column $column) {
198+
return array_filter($this->columns(), function (Column $column) {
199199
return $column->isSearchable();
200200
});
201201
}
@@ -218,7 +218,6 @@ public function applySearchFilter(Builder $query): Builder
218218

219219
// group search conditions together
220220
$query->where(function (Builder $subQuery) use ($search, $query) {
221-
222221
foreach ($this->getSearchableColumns() as $column) {
223222

224223
// does this column have an alias or relation?
@@ -238,7 +237,6 @@ public function applySearchFilter(Builder $query): Builder
238237

239238
// we can use a simple where clause
240239
$subQuery->orWhere($selectedColumn ?? $column->column(), 'like', '%' . $search . '%');
241-
242240
} else {
243241

244242
// parse the column
@@ -249,11 +247,9 @@ public function applySearchFilter(Builder $query): Builder
249247
$subQuery->orWhereHas($relationName, function (Builder $hasQuery) use ($fieldName, $column, $search) {
250248
$hasQuery->where($fieldName, 'like', '%' . $search . '%');
251249
});
252-
253250
}
254251
}
255252
});
256-
257253
}
258254

259255
return $query;

0 commit comments

Comments
 (0)