本文整理汇总了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'));
}
示例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);
}
示例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'));
}
示例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'));
}
示例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'));
}
示例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'));
}
示例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'));
}
示例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'));
}
示例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;
}
示例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'));
}
示例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']);
}
示例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'));
}
示例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);
}
示例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);
}
示例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]);
}