public function getCountyByCitycode()
 {
     $citycode = Input::get('citycode');
     $county = County::where('citycode', $citycode)->get();
     return json_encode(array('result' => true, 'county' => $county));
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $region = Region::raw()->findOne(['_id' => intval($id)]);
     $items = County::where('region_id', intval($id))->get();
     return view('poi.region.show')->with('region', $region)->with('items', $items);
 }
示例#3
0
 public function search(Request $request)
 {
     $token = $request->get('token');
     $counties = County::where('county', 'LIKE', '%' . $token . '%')->orderBy('county')->paginate(env('COUNTY_PAGINATION_MAX'));
     return view('counties.index')->with('counties', $counties);
 }