/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $districts_data = District::all()->lists('municipalities', 'name'); $city = City::find($id); if (is_null($city)) { return Redirect::route('admin.cities.index')->withErrors(array('mainError' => 'Градът/селото не е намерен.')); } else { return View::make('admin.city.edit')->with('city', $city)->with('districts_data', $districts_data); } }
public function getAlldistrict() { $gears = District::all(); return Response::json($gears); }
/** * Display a listing of districts * * @return Response */ public function index() { $districts = District::all(); return View::make('districts.index', compact('districts')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $districts_data = District::all(); return View::make('admin.district.list')->with('districts', $districts_data); }