Skip to content

Commit

Permalink
LP-15 userStatus method create
Browse files Browse the repository at this point in the history
  • Loading branch information
mah-shamim committed Nov 19, 2023
1 parent fd99454 commit f6f0b0e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

}
}

0 comments on commit f6f0b0e

Please sign in to comment.