当前位置: 首页>>代码示例>>PHP>>正文


PHP Country::lists方法代码示例

本文整理汇总了PHP中app\models\Country::lists方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::lists方法的具体用法?PHP Country::lists怎么用?PHP Country::lists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\models\Country的用法示例。


在下文中一共展示了Country::lists方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getEdit

 /**
  * @param $id
  * @return \Illuminate\View\View
  */
 public function getEdit($id)
 {
     $countrySelect = Country::lists('country_name', 'id');
     $user = User::findOrFail($id);
     return view('admin.edit', compact('user', 'countrySelect'));
 }
开发者ID:ruslankus,项目名称:lavarel-lessons,代码行数:10,代码来源:AdminController.php

示例2: projectedit

 public function projectedit(ProjectRepository $project_repo)
 {
     $categories = Category::lists('name', 'id');
     $genres = Genre::lists('name', 'id');
     $g_countries = Country::lists('countryName', 'countryID');
     $step_value = Session::get('editfstep');
     $edit_id = Session::has('editfs_id') ? Session::get('editfs_id') : '';
     $statArr = array('' => " -- Select -- ");
     $countries = array_merge($statArr, $g_countries);
     if (isset($edit_id)) {
         $projectdet = Project::where('id', $edit_id)->first();
     } else {
         $projectdet = array();
     }
     $gountryId = $projectdet['country_id'];
     $citylist = $this->project_repo->getcitylist($gountryId);
     $datan = array();
     foreach ($citylist as $cityval) {
         $id = $cityval['cityID'];
         $name = $cityval['cityName'];
         $datan[$id] = $name;
     }
     $rewardlist = $this->project_repo->getrewarddata($edit_id);
     if ($step_value == 1) {
         return view('project.startaproject-edit', ['last_insert_id' => $edit_id, 'categories' => $categories, 'genres' => $genres, 'projectdet' => $projectdet, '_menus' => $this->menuItems, 'login_url' => $this->login_url]);
     } elseif ($step_value == 2) {
         return view('project.startaproject-step2-edit', ['last_insert_id' => $edit_id, 'countries' => $countries, 'projectdet' => $projectdet, 'citylist' => $datan, '_menus' => $this->menuItems, 'login_url' => $this->login_url]);
     } elseif ($step_value == 3) {
         $prewordstat = $this->project_repo->projectrewordd($edit_id);
         if ($prewordstat > 0) {
             $rview = 'project.startaproject-step3-edit';
         } else {
             $rview = 'project.startaproject-step3';
         }
         return view($rview, ['rewardlist' => $rewardlist, 'last_insert_id' => $edit_id, 'projectdet' => $projectdet, '_menus' => $this->menuItems, 'login_url' => $this->login_url]);
     } elseif ($step_value == 4) {
         return view('project.project.create-step4', ['last_insert_id' => $edit_id, '_menus' => $this->menuItems, 'login_url' => $this->login_url]);
     } elseif ($step_value == 5) {
         return view('project.startaproject-confirmation', ['last_insert_id' => $edit_id, 'projectdet' => $projectdet, '_menus' => $this->menuItems, 'login_url' => $this->login_url]);
     } else {
         return view('project.project.editproject', ['last_insert_id' => $edit_id, '_menus' => $this->menuItems, 'login_url' => $this->login_url]);
     }
 }
开发者ID:udayc,项目名称:travel,代码行数:43,代码来源:ProjectController.php

示例3: getEditproject

 public function getEditproject(ProjectRepository $project_repo)
 {
     $users = User::lists('name', 'id');
     $categories = Category::lists('name', 'id');
     $genres = Genre::lists('name', 'id');
     $g_countries = Country::lists('countryName', 'countryID');
     $step_value = Session::get('editstep');
     $edit_id = Session::has('edit_id') ? Session::get('edit_id') : '';
     $statArr = array('' => " -- Select -- ");
     $countries = array_merge($statArr, $g_countries);
     if (isset($edit_id)) {
         $projectdet = Project::where('id', $edit_id)->first();
     } else {
         $projectdet = array();
     }
     $gountryId = $projectdet['country_id'];
     /*
     $getCitylist = $this->project_repo->getcitylist($gountryId);  
     echo "<pre>";
     print_r($getCitylist);
     exit;
      $statArr = array(
     				    0 => array(
     				        'cityID' => '',
     				        'cityName' => 'Select City'
     				    ) 
     			   );
     $result = array_merge($statArr, $citylist); 
     */
     $citylist = $this->project_repo->getcitylist($gountryId);
     $datan = array();
     foreach ($citylist as $cityval) {
         $id = $cityval['cityID'];
         $name = $cityval['cityName'];
         $datan[$id] = $name;
     }
     $rewardlist = $this->project_repo->getrewarddata($edit_id);
     $url = config('medias.url');
     $func = "edit";
     if ($step_value == 1) {
         return view('admin.project.editproject', ['func' => $func, 'url' => $url, 'last_insert_id' => $edit_id, 'categories' => $categories, 'genres' => $genres, 'users' => $users, 'projectdet' => $projectdet]);
     } elseif ($step_value == 2) {
         return view('admin.project.create-step2-edit', ['func' => $func, 'url' => $url, 'last_insert_id' => $edit_id, 'countries' => $countries, 'projectdet' => $projectdet, 'citylist' => $datan]);
     } elseif ($step_value == 3) {
         return view('admin.project.create-step3-edit', ['func' => $func, 'url' => $url, 'rewardlist' => $rewardlist, 'last_insert_id' => $edit_id, 'projectdet' => $projectdet]);
     } elseif ($step_value == 4) {
         return view('admin.project.create-step4', ['func' => $func, 'url' => $url, 'last_insert_id' => $edit_id]);
     } elseif ($step_value == 5) {
         return view('admin.project.confirmation', ['func' => $func, 'url' => $url, 'last_insert_id' => $edit_id]);
     } else {
         return view('admin.project.editproject', ['func' => $func, 'url' => $url, 'last_insert_id' => $edit_id]);
     }
 }
开发者ID:udayc,项目名称:travel,代码行数:53,代码来源:ProjectController.php

示例4: profile

 public function profile($id = null)
 {
     if (!$id) {
         $id = Company::create()->id;
         $newed = Company::findOrFail($id);
         event(new CompanyWasCreated($newed));
         return redirect('companies/' . $id . '/profile');
     } else {
         $company = Company::with($this->related)->where('id', $id)->first();
     }
     $countries = Country::lists('country', 'id');
     //return $company;
     return view('companies.profile', compact('company', 'countries'));
 }
开发者ID:wyrover,项目名称:aeroeco,代码行数:14,代码来源:CompaniesController.php

示例5: aircraft

 public function aircraft($id)
 {
     $aircraft = ProjectAircraft::where('project_id', $id)->first();
     $countries = Country::lists('country', 'id');
     $mfg = ['Boeing' => 'Boeing', 'Airbus' => 'Airbus'];
     $provider = ['ADC' => 'ADC', 'Owner' => 'Owner'];
     return view('projects.aircraft', compact('aircraft', 'countries', 'mfg', 'provider'));
 }
开发者ID:wyrover,项目名称:aeroeco,代码行数:8,代码来源:ProjectsController.php


注:本文中的app\models\Country::lists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。