Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
danidou committed Apr 10, 2024
1 parent d03d445 commit ce6357b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Models/Courses/CourseGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ public static function boot()

self::addGlobalScope('q', function (Builder $query) {
$locale = app()->getLocale();
if (request('q')) {
if (request()->input('q')) {
$query->where(function ($q) {
$q->where('title', 'LIKE', '%'.request('q').'%')
->orWhere('description', 'LIKE', '%'.request('q').'%');
$q->where("title->{$locale}", 'LIKE', '%'.request()->input('q').'%')
->orWhere("description->{$locale}", 'LIKE', '%'.request()->input('q').'%');
});
}
});
Expand Down

0 comments on commit ce6357b

Please sign in to comment.