/**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $municipality = Municipality::find(intval($id));
     $county = County::find(intval($municipality['county_id']));
     $items = Village::where('municipality_id', intval($id))->get();
     return view('poi.municipality.show')->with('municipality', $municipality)->with('county', $county)->with('items', $items);
 }
 public function geo($id)
 {
     $county = County::find(intval($id));
     $parser = new Parser();
     return response()->json($parser->json($county['geo']));
 }
Пример #3
0
 public function destroy($id)
 {
     County::find($id)->delete();
     $counties = County::orderBy('county')->paginate(env('COUNTY_PAGINATION_MAX'));
     return view('counties.index')->with('counties', $counties);
 }