/** * Show the form for editing the specified resource. * GET /entries/{id}/edit * * @param int $id * @return Response */ public function edit($id) { $entry = Entry::find($id); $foods = Food::all()->lists('name', 'id'); return View::make('entries.edit')->with(compact('entry'))->with(compact('foods')); }
/** * Display a listing of the resource. * GET /foods * * @return Response */ public function index() { $foods = Food::all(); return View::make('foods.index')->with(compact('foods')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $foods = Food::all(); return $foods; }
public function throwFood() { $food = Food::all(); return View::make('throw')->with('food', $food); }