diff --git a/src/Http/Controllers/UserController.php b/src/Http/Controllers/UserController.php index 48d5d02..e08196f 100644 --- a/src/Http/Controllers/UserController.php +++ b/src/Http/Controllers/UserController.php @@ -11,6 +11,7 @@ use Fintech\Auth\Http\Requests\UserAuthResetRequest; use Fintech\Auth\Http\Resources\UserCollection; use Fintech\Auth\Http\Resources\UserResource; +use Fintech\Core\Enums\Auth\UserStatus; use Fintech\Core\Exceptions\DeleteOperationException; use Fintech\Core\Exceptions\RestoreOperationException; use Fintech\Core\Exceptions\StoreOperationException; @@ -323,4 +324,18 @@ public function reset(string|int $id, string $field, UserAuthResetRequest $reque return $this->failed($exception->getMessage()); } } + + /** + * @return array + */ + public function userStatus(): array + { + $userStatus = UserStatus::cases(); + $array = []; + foreach($userStatus as $case) { + $array[$case->value] = $case->name; + } + return $array; + + } }