/** * Display a listing of the resource. * * @param Request $request * * @return Response */ public function index(Request $request) { $neighborhoods = Neighborhood::orderBy('name')->get(); return $this->respond(fractal()->collection($neighborhoods, new NeighborhoodTransformer())->parseIncludes($request->input('include', []))->toArray()); }
/** * Show the form for editing the specified resource. * * @param Point $coordinate * @return Response */ public function edit(Point $coordinate) { $neighborhoods = Neighborhood::lists('name', 'id'); return view('coordinates.edit', compact('point', 'neighborhoods')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit(BusStop $bus_stop) { $neighborhoods = Neighborhood::lists('name', 'id'); $points = Point::lists('id', 'id'); return view('bus_stops.edit', compact('bus_stop', 'neighborhoods', 'points')); }