Example #1
0
 public function MyAccount()
 {
     $hotels = Hotel::where('publicado', '=', 1)->count();
     $translados = Translado::where('publicado', '=', 1)->count();
     $especiais = EventoEspecial::where('publicado', '=', 1)->count();
     $passeios = Passeio::where('publicado', '=', 1)->count();
     $produtos = Produto::Where('publicado', '=', 1)->orderBy('created_at', 'DESC')->take(6)->get();
     return View::make('cliente.minhaconta', compact('hotels', 'translados', 'especiais', 'passeios', 'produtos'));
 }
Example #2
0
 /**
  * Remove the specified passeio from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Passeio::destroy($id);
     return Redirect::route('passeios.index');
 }
Example #3
0
 /**
  * Show the form for editing the specified pacote.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $pacote = Pacote::with('hoteis', 'apartamentos', 'passeios', 'servicosnoturnos')->find($id);
     $paises = Pais::lists("name", "id");
     $hoteis = Hotel::with('pais')->get();
     $apartamentos = Apartamento::with('pais')->get();
     $passeios = Passeio::with('pais')->get();
     $servicosnoturnos = ServicoNoturno::with('pais')->get();
     $pacote_hoteis = $pacote->hoteis;
     $angular['hoteis'] = $pacote_hoteis->map(function ($hotel) {
         unset($hotel->descricao_br);
         unset($hotel->descricao_en);
         return $hotel;
     });
     return View::make('admin.pacote.edit', compact('pacote', 'paises', 'hoteis', 'apartamentos', 'passeios', 'servicosnoturnos', 'angular'));
 }
Example #4
0
 /**
  * Remove the specified passeio from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $passeio = Passeio::find($id);
     $passeio->imagens()->delete();
     $passeio->delete();
     return Redirect::to('admin/passeio/')->with('success', array('Registro deletado.'));
 }
 /**
  * Show the form for editing the specified pacote.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $evento = EventoEspecial::with('hoteis', 'apartamentos', 'passeios', 'servicosnoturnos')->find($id);
     $paises = Pais::lists("name", "id");
     $hoteis = Hotel::with('pais')->get();
     $apartamentos = Apartamento::with('pais')->get();
     $passeios = Passeio::with('pais')->get();
     $servicosnoturnos = ServicoNoturno::with('pais')->get();
     return View::make('admin.eventoespecial.edit', compact('evento', 'paises', 'hoteis', 'apartamentos', 'passeios', 'servicosnoturnos'));
 }