Esempio n. 1
0
 /**
  * Display the specified resource.
  * GET /usuarios/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function getEdit($id = NULL)
 {
     if (isset($id)) {
         $usuario = Usuario::find($id);
         $perfiles = Perfil::all()->lists('nombre', 'id');
         $hoteles = Hotel::all()->lists('nombre', 'id');
         $personas = Persona::all()->lists('nombre', 'id');
         return View::make('usuarios.edit', compact('perfiles', 'hoteles', 'personas', 'usuario'));
     } else {
         return Redirect::to('/usuarios');
     }
 }
Esempio n. 2
0
 public function index($registros = 5)
 {
     $datos = Hotel::paginate($registros);
     $hotels = Hotel::all();
     return View::make('hotel.index', compact("datos"), array('hotels' => $hotels));
 }
Esempio n. 3
0
 public function Hotels($page = '', $perpage = '')
 {
     $h = new Hotel();
     echo json_encode($h->all($page, $perpage));
     // or render View
 }
 public function getEventhotel()
 {
     $hotels = Hotel::all();
     return View::make('hotelbooking.eventhotel')->with('hotels', $hotels);
 }