Skip to content

Commit

Permalink
Pass in outer params
Browse files Browse the repository at this point in the history
  • Loading branch information
Cocoa committed Jul 3, 2024
1 parent 6b26d27 commit fe9e106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ protected function years(Request $request, Builder $query)
$query->whereBetween('year', [$start_year, $end_year]);

} elseif ($matcher == "NOT") {
$query->where(function ($query) {
$query->where(function ($query) use ($start_year, $end_year) {
$query->whereNotBetween('year', [$start_year, $end_year])
->orWhereNull('year');
});
Expand Down

0 comments on commit fe9e106

Please sign in to comment.