Heera/Modules/Admin/app/Services/AdminService.php
2024-05-16 09:31:08 +05:45

75 lines
1.4 KiB
PHP

<?php
namespace Modules\Admin\Services;
use Modules\Admin\Models\Caste;
use Modules\Admin\Models\City;
use Modules\Admin\Models\Company;
use Modules\Admin\Models\CompanyType;
use Modules\Admin\Models\Country;
use Modules\Admin\Models\Department;
use Modules\Admin\Models\Designation;
use Modules\Admin\Models\District;
use Modules\Admin\Models\Gender;
use Modules\Admin\Models\Nationality;
use Modules\Admin\Models\Province;
final class AdminService
{
function pluckCountries()
{
return Country::pluck('name', 'id');
}
function pluckCompanyTypes()
{
return CompanyType::pluck('name', 'id');
}
function pluckCompanies()
{
return Company::pluck('name', 'id');
}
function pluckProvinces()
{
return Province::pluck('name', 'id');
}
function pluckDistricts()
{
return District::pluck('name', 'id');
}
function pluckCities()
{
return City::pluck('name', 'id');
}
function pluckCastes()
{
return Caste::pluck('name', 'id');
}
function pluckGenders()
{
return Gender::pluck('name', 'id');
}
function pluckNationalities()
{
return Nationality::pluck('name', 'id');
}
function pluckDepartments()
{
return Department::pluck('name', 'department_id');
}
function pluckDesignations()
{
return Designation::pluck('name', 'designation_id');
}
}