New-OMIS/Modules/Admin/app/Services/AdminService.php

69 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2024-04-11 10:59:09 +00:00
<?php
namespace Modules\Admin\Services;
use Modules\Admin\Models\Castes;
use Modules\Admin\Models\Cities;
use Modules\Admin\Models\CompanyType;
2024-04-11 10:59:09 +00:00
use Modules\Admin\Models\Country;
2024-04-11 12:05:16 +00:00
use Modules\Admin\Models\Departments;
use Modules\Admin\Models\Designations;
2024-04-11 10:59:09 +00:00
use Modules\Admin\Models\Districts;
use Modules\Admin\Models\Genders;
use Modules\Admin\Models\Nationalities;
use Modules\Admin\Models\Province;
final class AdminService
{
function pluckCountries()
{
return Country::pluck('title', 'country_id');
}
function pluckCompanyTypes()
{
return CompanyType::pluck('title', 'company_type_id');
}
2024-04-11 10:59:09 +00:00
function pluckProvinces()
{
return Province::pluck('title', 'province_id');
}
function pluckDistricts()
{
return Districts::pluck('title', 'district_id');
}
function pluckCities()
{
return Cities::pluck('title', 'city_id');
}
function pluckCastes()
{
return Castes::pluck('title', 'caste_id');
}
function pluckGenders()
{
return Genders::pluck('title', 'gender_id');
}
function pluckNationalities()
{
return Nationalities::pluck('title', 'nationality_id');
}
2024-04-11 12:05:16 +00:00
function pluckDepartments()
{
return Departments::pluck('title', 'department_id');
}
function pluckDesignations()
{
return Designations::pluck('title', 'designation_id');
}
2024-04-11 10:59:09 +00:00
}