/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { // $opciontemporada = Temporada::all()->lists('nombre', 'id'); $numtemporada = $opciontemporada->first(); //(int) $numtemporada; //echo ($numtemporada); $opcionesplatillos = Platillo::where('temporada_id', '=', $numtemporada)->lists('nombre', 'id'); //echo($numero); return view('detalleventa.create', compact('opciontemporada'), compact('opcionesplatillos')); }
/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(Request $request, $id) { // $platillo = Platillo::find($id); $platillo->fill($request->all()); $platillo->save(); return redirect('/platillo')->with('message', 'edit'); }
public function findall() { return $Platillos = Platillo::all(); }