当前位置: 首页>>代码示例>>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;未经允许,请勿转载。