summaryrefslogtreecommitdiff
path: root/includes/controller
diff options
context:
space:
mode:
Diffstat (limited to 'includes/controller')
-rw-r--r--includes/controller/shift_entries_controller.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php
index a6659598..3c6c3a7c 100644
--- a/includes/controller/shift_entries_controller.php
+++ b/includes/controller/shift_entries_controller.php
@@ -2,6 +2,7 @@
use Engelsystem\Models\User\User;
use Engelsystem\ShiftSignupState;
+use Illuminate\Database\Eloquent\Collection;
/**
* Route shift entry actions.
@@ -109,7 +110,8 @@ function shift_entry_create_controller_admin($shift, $angeltype)
redirect(shift_link($shift));
}
- $users = User::all();
+ /** @var User[]|Collection $users */
+ $users = User::query()->orderBy('name')->get();
$users_select = [];
foreach ($users as $user) {
$users_select[$user->id] = $user->name;