add select
This commit is contained in:
@ -44,4 +44,16 @@ class UserService
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function createUsernameArr(): array
|
||||
{
|
||||
foreach (User::all()->toArray() as $user) {
|
||||
|
||||
$userArr[$user['id']] = $user['username'];;
|
||||
}
|
||||
if (!empty($userArr)) {
|
||||
return $userArr;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user