Files
online.tbbank.gov.tm-larave…/app/Modules/BaseAppEnum/Controllers/BaseAppEnumController.php
2025-06-11 18:05:30 +05:00

52 lines
1.5 KiB
PHP

<?php
namespace App\Modules\BaseAppEnum\Controllers;
use App\Http\Controllers\Controller;
use App\Repos\Order\Card\CardStateRepo;
use App\Repos\Order\Card\CardTypeRepo;
use App\Repos\Order\Loan\LoanTypeRepo;
use App\Repos\System\Settings\Legal\EducationRepo;
use App\Repos\System\Settings\Legal\MarriageRepo;
use App\Repos\System\Settings\Legal\PassportRepo;
use App\Repos\System\Settings\Location\RegionRepo;
use Dedoc\Scramble\Attributes\Group;
#[Group('1. App enums')]
class BaseAppEnumController extends Controller
{
/**
* Base app enums
*
* `System` -daky esasy bolup biljek `Maglumatlar`, köplenç `Select` -larda ulanylýar.
*
* @return array<string, string>
*/
public function index(): array
{
return [
'loan_types' => LoanTypeRepo::onlyGuarantor(),
'regions' => RegionRepo::values(),
'educations' => $this->educationValues(),
'marriage_statuses' => MarriageRepo::values(),
'passport_series' => PassportRepo::values(),
'card_types' => CardTypeRepo::values(),
'card_states' => CardStateRepo::values(),
];
}
/**
* Education values
*
* @return array<string, string>
*/
public function educationValues(): array
{
return [
EducationRepo::MIDDLE_SCHOOL => __('Middle school'),
EducationRepo::UNFINISHED_HIGH_EDUCATION => __('Unfinished high education'),
EducationRepo::HIGH_EDUCATION => __('High education'),
];
}
}