/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { #$habitaciones = habitacion::lists('numero','idHabitacion'); #return view('registro.create')->with('habitaciones',$habitaciones); $habitaciones = habitacion::all(); return view('registro.create'); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(HabitacionCreateRequest $request) { habitacion::create($request->all()); Session::flash('message', 'Habitacion creada correctamente'); return redirect::to('/habitacion'); }