/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $tipos = TipoBus::lists('nombre', 'id'); $servicios = Servicio::lists('nombre', 'id'); return view('precios.create', array('tipos' => $tipos, 'servicios' => $servicios)); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $obj = Bus::findOrFail($id); $tipos = TipoBus::lists('nombre', 'id'); return view('buses.edit', array('obj' => $obj, 'tipos' => $tipos)); }