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


PHP City::lists方法代码示例

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


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

示例1: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param Venue $venue
  * @return Response
  * @internal param int $id
  */
 public function edit(Venue $venue)
 {
     $features = Feature::lists('feature', 'id');
     $cities = City::lists('name', 'id');
     $types = Type::lists('type', 'id');
     return view('venues.edit', compact('venue', 'features', 'cities', 'types'));
 }
开发者ID:robjmills,项目名称:craftbeerfinder,代码行数:14,代码来源:VenueController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $province_id = Input::get('province_id');
     $city_id = Input::get('city_id');
     $specialization_id = Input::get('specialization_id');
     $verified = Input::get('verified');
     $data = array();
     if (empty($province_id) && empty($city_id) && empty($specialization_id) && empty($verified)) {
         //menampilkan semua gender
         $data['content'] = \App\Doctor::all();
         $data['province_id'] = null;
         $data['city_id'] = null;
         $data['specialization_id'] = null;
         $data['verified'] = null;
     } else {
         $data['content'] = $data['province_id'] = $province_id;
         $data['city_id'] = $city_id;
         $data['specialization_id'] = $specialization_id;
         $data['verified'] = $verified;
     }
     $data['list_province'] = \App\Province::lists('name', 'id');
     $data['list_city'] = \App\City::lists('name', 'id');
     $data['list_specialization'] = \App\Specialization::lists('name', 'id');
     return view('pages.admin.clinic.doctor.index')->with('data', $data);
 }
开发者ID:deryrahma,项目名称:dokternet,代码行数:31,代码来源:DoctorAtClinicAdminController.php

示例3: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $brand = Brand::find($id);
     $cities = City::lists('city_name', 'id')->all();
     $brand_types = BrandType::lists('type_name', 'id')->all();
     return view('admin.brands.edit', compact('brand', 'cities', 'brand_types'));
 }
开发者ID:roopunk,项目名称:fashionove,代码行数:13,代码来源:BrandsController.php

示例4: create

 public function create()
 {
     $area = Area::lists('name', 'id');
     $typeOfProperty = TypeOfProperty::lists('type', 'id');
     $numberOfRooms = NumberOfRooms::lists('number', 'id');
     $city = City::lists('city', 'id');
     return view('announcements.create', compact('area', 'typeOfProperty', 'numberOfRooms', 'city'));
 }
开发者ID:jeezybrick,项目名称:kvartiri,代码行数:8,代码来源:PropertyController.php

示例5: index

 public function index()
 {
     $users = Auth::user();
     $userInfo = $users->info;
     $city = City::lists('city', 'id');
     if (is_null($users)) {
         abort(404);
     }
     return view('user.index', compact('users', 'userInfo', 'city'));
 }
开发者ID:jeezybrick,项目名称:kvartiri,代码行数:10,代码来源:UserController.php

示例6: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $item = Inquiry::with('carinfo')->findOrFail($id);
     $cars = Car::lists('name', 'id')->all();
     $cities = City::lists('name', 'id')->all();
     foreach (config('vars.car_info.color') as $key => $value) {
         $colors[$key] = $value['name'];
     }
     return view('admin.inquiries.edit', compact('item', 'cars', 'cities', 'colors'));
 }
开发者ID:jambik,项目名称:sellmecar,代码行数:16,代码来源:InquiriesController.php

示例7: edit

 public function edit($id)
 {
     $data = [];
     $data['article'] = ArticleCategory::with('articles')->get();
     $data['content'] = \App\Doctor::find($id);
     $data['list_province'] = \App\Province::lists('name', 'id');
     $data['list_city'] = \App\City::lists('name', 'id');
     $data['list_specialization'] = \App\Specialization::lists('name', 'id');
     $data['days'] = \App\Day::lists('name', 'id');
     return view('frontend.pages.clinic.doctor-edit', compact('data'));
 }
开发者ID:deryrahma,项目名称:dokternet,代码行数:11,代码来源:DoctorClinicController.php

示例8: homepage

 public function homepage()
 {
     $user = Auth::user() ?: false;
     $cars = Car::with('inquiriesCount')->orderBy('domestic', 'asc')->orderBy('name')->get();
     $cars1 = $cars->filter(function ($item) {
         return $item->name == "ВАЗ";
     });
     $cars2 = $cars->filter(function ($item) {
         return $item->name != "ВАЗ";
     });
     $cars = $cars1->merge($cars2);
     $carsList = $cars->lists('name', 'id')->toArray();
     $lastInquiries = Inquiry::with('car', 'city')->orderBy('created_at', 'desc')->paginate(config('vars.inquiries_per_page'));
     $lastInquiries->setPath('inquiry/index');
     Carbon::setLocale(config('app.locale'));
     $lastNews = News::orderBy('published_at', 'desc')->paginate(config('vars.news_per_page'));
     $lastNews->setPath('news/index');
     $cities = City::lists('name', 'id')->all();
     $blocks = Block::all()->keyBy('alias');
     $faq = Faq::all();
     return view('homepage', compact('user', 'cars', 'carsList', 'lastInquiries', 'lastNews', 'cities', 'blocks', 'faq'));
 }
开发者ID:jambik,项目名称:sellmecar,代码行数:22,代码来源:HomepageController.php

示例9: getCity

 public function getCity($id)
 {
     $city = City::lists('id', 'name');
     $userData = User::where('id', $id)->first();
     $array = '<select class="form-control" id="userLocation">';
     foreach ($city as $key => $value) {
         if ($userData['default_city'] == $value) {
             $array .= '<option id="' . $value . '" selected>' . $key . '</option>';
         } else {
             $array .= '<option id="' . $value . '">' . $key . '</option>';
         }
     }
     $array .= '</select>';
     $Response = array('city' => $array);
     return $Response;
 }
开发者ID:sulthanallaudeen,项目名称:greenhopping,代码行数:16,代码来源:AppController.php

示例10: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $item = Metro::findOrFail($id);
     $cities = City::lists('name', 'id')->all();
     return view('admin.metro.edit', compact('item', 'cities'));
 }
开发者ID:jambik,项目名称:sellmecar,代码行数:12,代码来源:MetroController.php

示例11: editPage

 /**
  * Страница редактирования организации
  * @param Organization $organization
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function editPage(Organization $organization)
 {
     FormFacade::model($organization);
     return view('admin.organization.create', ['statuses' => Status::lists('name', 'id'), 'opfs' => Opf::lists('name', 'id'), 'cities' => City::lists('name', 'id'), 'type' => $organization->type_id, 'parent' => $organization->parent, 'organization' => $organization, 'phone' => $organization->phone, 'email' => $organization->email, 'menu' => 'edit']);
 }
开发者ID:w1lliams,项目名称:sh,代码行数:10,代码来源:OrganizationController.php

示例12: form

 public function form($id, Request $request)
 {
     $item = Inquiry::with('carinfo')->findOrFail($id);
     $cars = Car::lists('name', 'id')->all();
     $cities = City::lists('name', 'id')->all();
     foreach (config('vars.car_info.color') as $key => $value) {
         $colors[$key] = $value['name'];
     }
     return view('partials._inquiry_form', compact('item', 'cars', 'cities', 'colors'));
 }
开发者ID:jambik,项目名称:sellmecar,代码行数:10,代码来源:InquiriesController.php

示例13: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     //
     $data = array();
     $data['content'] = \App\Clinic::find($id);
     $data['list_province'] = \App\Province::lists('name', 'id');
     $data['list_city'] = \App\City::lists('name', 'id');
     return view('pages.admin.clinic.edit')->with('data', $data);
 }
开发者ID:deryrahma,项目名称:dokternet,代码行数:15,代码来源:ClinicAdminController.php

示例14: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     //
     $data = array();
     $data['content'] = \App\Doctor::find($id);
     $data['list_province'] = \App\Province::lists('name', 'id');
     $data['list_city'] = \App\City::lists('name', 'id');
     $data['list_specialization'] = \App\Specialization::lists('name', 'id');
     $data['days'] = \App\Day::lists('name', 'id');
     return view('pages.admin.doctor.edit')->with('data', $data);
 }
开发者ID:deryrahma,项目名称:dokternet,代码行数:17,代码来源:DoctorAdminController.php

示例15: getCustomerPoint

 public function getCustomerPoint($action, $id)
 {
     $city_options = \App\City::lists('name', 'id');
     $days_options = \App\Day::lists('name', 'id');
     $status_options = ['active' => 'Activo', 'inactive' => 'Inactivo'];
     $type_options = ['agency' => 'Agencia', 'branch' => 'Sucursal', 'atm' => 'Cajero'];
     $product_options = \App\Product::where('status', 'active')->whereIn('type', ['important_product', 'product'])->lists('name', 'id');
     return AdminItem::get_request('customer-point', $action, $id, $this, ['parent' => 'parent'], ['city_options' => $city_options, 'days_options' => $days_options, 'status_options' => $status_options, 'type_options' => $type_options, 'product_options' => $product_options]);
 }
开发者ID:solunes,项目名称:master,代码行数:9,代码来源:CustomAdminController.php


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