當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Country::getListCountries方法代碼示例

本文整理匯總了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");
 }
開發者ID:rowanhwilliams,項目名稱:ftm-php,代碼行數:69,代碼來源:CompaniesController.php


注:本文中的app\models\Country::getListCountries方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。