Ejemplo n.º 1
0
 /**
  * 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'));
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  * GET /foods
  *
  * @return Response
  */
 public function index()
 {
     $foods = Food::all();
     return View::make('foods.index')->with(compact('foods'));
 }
Ejemplo n.º 3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $foods = Food::all();
     return $foods;
 }
Ejemplo n.º 4
0
 public function throwFood()
 {
     $food = Food::all();
     return View::make('throw')->with('food', $food);
 }