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


PHP Country::all方法代碼示例

本文整理匯總了PHP中app\Country::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Country::all方法的具體用法?PHP Country::all怎麽用?PHP Country::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Country的用法示例。


在下文中一共展示了Country::all方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ShowBranchProfile

 public function ShowBranchProfile($id, $branchid)
 {
     $update = PartnerBranch::where('id', $branchid)->first();
     $countries = Country::all();
     $partnerid = Partner::find($id);
     return view('deskpad/updatebranch', compact('update', 'partnerid', 'countries'));
 }
開發者ID:esmeromichael,項目名稱:grading,代碼行數:7,代碼來源:BranchController.php

示例2: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $countries = \App\Country::all();
     foreach ($countries as $country) {
         echo "DB::table('country')->insert(['cc_fips' => '{$country->cc_fips}','cc_iso' => '{$country->cc_iso}','cc_tld' => '{$country->cc_tld}','country_name' => '{$country->country_name}',]); \n";
     }
 }
開發者ID:roxanaa,項目名稱:docker-final-project,代碼行數:12,代碼來源:WorldApiCommand.php

示例3: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $player = Player::find($id);
     $seasons = Season::all();
     $positions = Position::all();
     $countries = Country::all();
     return view('admin.players.edit', compact('player', $player, 'seasons', $seasons, 'positions', $positions, 'countries', $countries));
 }
開發者ID:leloulight,項目名稱:RealMadrid,代碼行數:14,代碼來源:PlayersController.php

示例4: ShowUpdateContacts

 public function ShowUpdateContacts($id, $branchid)
 {
     $updatecontact = PartnerContact::where('id', $branchid)->first();
     $countries = Country::all();
     $citizenships = Citizenship::all();
     $partnertitles = Partnertitle::all();
     $partnerid = Partner::find($id);
     return view('deskpad/updatecontact', compact('updatecontact', 'partnerid', 'countries', 'citizenships', 'partnertitles'));
 }
開發者ID:esmeromichael,項目名稱:grading,代碼行數:9,代碼來源:ContactController.php

示例5: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $statusCode = 200;
     $response = ['countries' => []];
     $countries = Country::all();
     foreach ($countries as $country) {
         $response['countries'][] = ['id' => $country->id, 'country' => $country->country];
     }
     return response($response, $statusCode);
 }
開發者ID:mudragel,項目名稱:matematika-test.loc,代碼行數:15,代碼來源:CountryController.php

示例6: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $countries = \App\Country::all()->lists('name', 'id');
     $state = \App\State::find($id);
     if ($state) {
         return view('states.edit', ['state' => $state, 'countries' => $countries]);
     }
     flash()->error('State does not exist.');
     return \Redirect::back();
 }
開發者ID:atindermann08,項目名稱:readr,代碼行數:16,代碼來源:StateController.php

示例7: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  *
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $city = City::findOrFail($id);
     $country = Country::all();
     $language = Language::all();
     $languages_cur = $city->language;
     foreach ($languages_cur as $language_cur) {
         $lang[] = $language_cur['id'];
     }
     return view('editCity', ['id' => $id, 'city' => $city->city, 'country_cur' => $city->country_id, 'languages_cur' => $lang, 'countries' => $country, 'languages' => $language]);
 }
開發者ID:mudragel,項目名稱:matematika-test.loc,代碼行數:18,代碼來源:CityController.php

示例8: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $title = 'CONFIG';
     $country = Country::all()->sortBy('country');
     $designation = Designation::all()->sortBy('designation');
     $city = City::all()->sortBy('city');
     $state = State::all()->sortBy('state');
     $brands = Brands::all()->sortBy('brand');
     $models = Models::all()->sortBy('model');
     $businessType = BusinessType::all()->sortBy('name');
     return view('myConfig.index', compact('title', 'country', 'designation', 'city', 'state', 'brands', 'models', 'businessType'));
 }
開發者ID:smartrahat,項目名稱:zamzam,代碼行數:17,代碼來源:MyConfigController.php

示例9: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     if ($this->option('all')) {
         foreach (Country::all() as $country) {
             $country->import();
             sleep(5);
         }
     } elseif ($this->argument('country')) {
         $country = Country::find($this->argument('country'));
         if (count($country)) {
             $country->import();
         }
     }
 }
開發者ID:santakani,項目名稱:santakani.com,代碼行數:19,代碼來源:CountryImport.php

示例10: edit

 /**
  * Returns a view for editing various details about a specific user
  *
  * @param $name Node 'name' label to match when editing a user
  * @return $this
  */
 public function edit($name)
 {
     $user = User::whereName($name)->first();
     $groups = Group::all(['id', 'name']);
     $groupList = array();
     foreach ($groups as $group) {
         $groupList[$group->id] = $group->name;
     }
     $countries = Country::all(['id', 'name']);
     $countryList = array();
     foreach ($countries as $country) {
         $countryList[$country->id] = $country->name;
     }
     return view('admin.users.edit', compact('user'))->with('groupList', $groupList)->with('countryList', $countryList);
 }
開發者ID:bstapleton,項目名稱:pi-community,代碼行數:21,代碼來源:UserController.php

示例11: newArt

 public function newArt()
 {
     $getEra = Era::all();
     foreach ($getEra as $Era) {
         $eras[$Era->id] = $Era->name;
     }
     $getStyle = Style::all();
     foreach ($getStyle as $Style) {
         $styles[$Style->id] = $Style->name;
     }
     $getCountry = Country::all();
     foreach ($getCountry as $Country) {
         $countrys[$Country->name] = $Country->name;
     }
     return view('art.new', compact('styles', 'eras', 'countrys'));
 }
開發者ID:jonasvr,項目名稱:auction,代碼行數:16,代碼來源:ArtController.php

示例12: playerCountry

 public function playerCountry(Request $request)
 {
     $this->validate($request, ['country_title' => 'required']);
     //dd($request->all());
     if ($request->file('ajax-country-flag')) {
         // $this->validate($request,['ajax-country-flag'=>'required|image|mimes:jpeg,jpg,png,bmp,gif,svg']);
         $file = $request->file('ajax-country-flag');
         $path = $this->_country_flag_path;
         $name = uniqid() . $file->getClientOriginalName();
         $file->move($path, $name);
     }
     $country = new Country(array('title' => $request->get('country_title'), 'flag_name' => $name, 'flag_path' => $path));
     $country->save();
     $countries = Country::all();
     return response()->json($countries);
 }
開發者ID:leloulight,項目名稱:RealMadrid,代碼行數:16,代碼來源:CountriesController.php

示例13: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create($company_id)
 {
     $company = Company::find($company_id);
     $countries = Country::all();
     foreach ($countries as $ctr) {
         $country_names[$ctr->id] = $ctr->name;
     }
     $cities = City::all();
     foreach ($cities as $ct) {
         $city_names[$ct->id] = $ct->name;
     }
     foreach (Language::all() as $lang) {
         $langs[$lang->id] = $lang->name;
     }
     return view('jobs.create', compact('country_names', 'city_names', 'langs', 'company'));
 }
開發者ID:AlSt2015,項目名稱:jobs4creative,代碼行數:21,代碼來源:JobController.php

示例14: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     try {
         $statusCode = 200;
         //			$response = [
         //				'Countries List'  => []
         //			];
         $countries = Country::all();
         foreach ($countries as $country) {
             //
             $response['Country List'][] = ['id' => $country->id, 'Country' => $country->country];
         }
         //			$response=$gender;
     } catch (Exception $e) {
         $statusCode = 400;
     } finally {
         return Response::json($response, $statusCode);
     }
 }
開發者ID:vinPopulaire,項目名稱:SPtool,代碼行數:24,代碼來源:CountriesApiController.php

示例15: getAllForDropdown

 /**
  * Get all titles and return a simple array for dropdown list.
  *
  *
  * @return array $titleArray
  */
 public function getAllForDropdown()
 {
     $countries = Country::all();
     return Helper::getDropdownArray($countries);
 }
開發者ID:hktang,項目名稱:apnis,代碼行數:11,代碼來源:CountryRepository.php


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