Skip to content

Commit

Permalink
fix: Correct email dispatching in user management
Browse files Browse the repository at this point in the history
  • Loading branch information
xboard committed Feb 22, 2025
1 parent b7e87ba commit c45ba9a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/V2/Admin/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,8 @@ public function sendMail(UserSendMail $request)
$sortType = in_array($request->input('sort_type'), ['ASC', 'DESC']) ? $request->input('sort_type') : 'DESC';
$sort = $request->input('sort') ? $request->input('sort') : 'created_at';
$builder = User::orderBy($sort, $sortType);
$this->applyFilters($request, $builder);
$this->applyFiltersAndSorts($request, $builder);
$users = $builder->get();
return $this->success($users->count());
foreach ($users as $user) {
SendEmailJob::dispatch(
[
Expand Down

0 comments on commit c45ba9a

Please sign in to comment.