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')); }
/** * Display the specified eventoespecial. * * @param int $id * @return Response */ public function getShow($id) { $eventoespecial = EventoEspecial::findOrFail($id); $hoteis = $this->removeHtmlDescricao($eventoespecial->hoteis); $apartamentos = $this->removeHtmlDescricao($eventoespecial->apartamentos); $passeios = $this->removeHtmlDescricao($eventoespecial->passeios); $snoturnos = $this->removeHtmlDescricao($eventoespecial->servicosnoturnos); $this->addVisita($eventoespecial); $similar = EventoEspecial::similares(); return View::make('eventoespecial.show', compact('eventoespecial', 'hoteis', 'apartamentos', 'passeios', 'snoturnos'))->nest('similar_listing', 'widgets.similar_listing', array('data' => $similar, 'caminho' => 'uploads/eventosespeciais/')); }
public function getIndex() { // if(Auth::check()) // { // debug(Auth::user()->toArray()); // } $destinos = Destino::all(); $populares = Pacote::where('publicado', 1)->orderBy('visitas', 'DESC')->take(10)->get(); $eventos = EventoEspecial::Where('destaque', 1)->take(3)->get(); if ($eventos->isEmpty()) { $eventos = EventoEspecial::take(3)->get(); } //$cotacao_dolar = Configuracao::where('param', 'cotacao_dolar')->first()->valor; //debug($populares); foreach ($destinos as $destino) { $json[] = $destino->nome_br; } $json = json_encode($json); //debug(Session::get('carrinho')); return View::make('common.home2', compact('filter_hotel', 'json', 'populares', 'cotacao_dolar', 'eventos')); }
/** * Remove the specified pacote from storage. * * @param int $id * @return Response */ public function destroy($id) { $evento = EventoEspecial::find($id); $evento->imagens()->delete(); $evento->delete(); return Redirect::to('admin/eventoespecial/')->with('success', array('Registro deletado.')); }