本文整理汇总了PHP中app\models\Country::getListCountries方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::getListCountries方法的具体用法?PHP Country::getListCountries怎么用?PHP Country::getListCountries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Country
的用法示例。
在下文中一共展示了Country::getListCountries方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: passData
private function passData($id = null)
{
$HQAddresses = new \App\Models\Addresses();
$HQPhones = new \App\Models\Phones();
$company = new \App\Models\Companies();
$ultimateParentCompany = new \App\Models\Companies();
if (!is_null($id)) {
$company = Companies::findOrNew($id);
$mediaContacts = $company->mediaContacts()->get();
$attachments = $company->attachments()->get();
$ultimateParentCompany = $company->ultimateParent()->get();
} else {
if (!Session::has('MediaContacts')) {
Session::set('MediaContacts', $company->mediaContacts()->get());
}
if (!Session::has('CompanyAttachments')) {
Session::set('CompanyAttachments', $company->attachments()->get());
}
$mediaContacts = Session::get('MediaContacts');
$attachments = Session::get("CompanyAttachments");
}
$eSize = EmployeeSize::all()->toArray();
$gProfile = GrowthProfile::where('id_Growth_Profile', '>', 1)->get()->toArray();
$oship = Ownership::all()->toArray();
$rStage = RevenueStage::where('id_Revenue_Stage', '>', 1)->get()->toArray();
$cType = CompanyType::all()->toArray();
$csType = CompanySubType::all()->toArray();
$uParent = Companies::where("Deleted", "=", NULL)->get()->sortBy('Company_Full_Name')->toArray();
$products = $company->products()->whereNull("Deleted");
foreach ($products->get() as $product) {
$productFocusTypeList[$product->id_Product] = [];
$productTypeList = [];
foreach ($product->focusSubType()->get() as $productSubType) {
$productTypeList[0] = $productSubType->Product_Focus_Sub_Type;
$productTypeListValues = ProductFocusType::where('id_Product_Focus_Type', '=', $productSubType->id_Product_Focus_Type)->get()->first();
$productTypeList[1] = $productTypeListValues->Product_Focus_Type;
$productFocusTypeList[$product->id_Product][] = $productTypeList;
}
}
if ($company->headquaters()->get()->count()) {
$HQAddresses = Addresses::findOrNew($company->headquaters()->get()->first()->AddressId);
}
if ($company->headquaters()->get()->count() && $company->headquaters()->get()->first()->PhoneId) {
$HQPhones = Phones::findOrNew($company->headquaters()->get()->first()->PhoneId);
}
foreach ($eSize as $emSize) {
$employeeSize[$emSize["id_Employee_Size"]] = $emSize["Employee_Size"];
}
foreach ($gProfile as $gwProfile) {
$growthProfile[$gwProfile["id_Growth_Profile"]] = $gwProfile["Growth_Profile"];
}
foreach ($oship as $owship) {
$ownership[$owship["id_Ownership"]] = $owship["Ownership"];
}
foreach ($rStage as $revStage) {
$revenueStage[$revStage["id_Revenue_Stage"]] = $revStage["Revenue_Stage"];
}
foreach ($cType as $coType) {
$companyType[$coType["id_Company_Type"]] = $coType["Company_Type"];
}
foreach ($csType as $coSuType) {
$companySubType[$coSuType["id_Company_Sub_Type"]] = $coSuType["Company_Sub_Type_Name"];
}
foreach ($uParent as $ulParent) {
$ultimateParent[$ulParent["id_Company"]] = $ulParent["Company_Full_Name"];
}
$country = Country::getListCountries();
return compact("employeeSize", "growthProfile", "productFocusTypeList", "ownership", "revenueStage", "companyType", "companySubType", "company", "ultimateParent", "mediaContacts", "country", "HQAddresses", "HQPhones", "products", "attachments", "ultimateParentCompany");
}