Skip to content

Commit

Permalink
master search issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Sep 26, 2024
1 parent c0511d0 commit d65efa5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Repositories/Eloquent/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ public function list(array $filters = [])
});
}

if (!empty($filters['country_id'])) {
$query->whereHas('profile', function (Builder $builder) use (&$filters) {
return $builder->where('present_country_id', '=', $filters['country_id']);
});
}

if (!empty($filters['role_name'])) {
$query->whereHas('roles', function (Builder $builder) use (&$filters) {
return $builder->where('name', '=', $filters['role_name']);
Expand Down

0 comments on commit d65efa5

Please sign in to comment.