Ejemplo n.º 1
0
 public function index()
 {
     $this->data['destinos'] = Destino::all();
     $this->data['destinosActive'] = 'active';
     $benCount = array();
     foreach (Destino::all() as $des) {
         $benCount[$des->id] = Beneficiario::join('objetivo', 'beneficiarios.objetivo', '=', 'objetivo.id')->join('destino', 'objetivo.destID', '=', 'destino.id')->where('destino.id', '=', $des->id)->count();
     }
     $this->data['beneficiarioCount'] = $benCount;
     return View::make('admin.destinos.index', $this->data);
 }
Ejemplo n.º 2
0
 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'));
 }
Ejemplo n.º 3
0
 /**
  * Display a listing of destinos
  *
  * @return Response
  */
 public function index()
 {
     $destinos = Destino::all();
     return View::make('destinos.index', compact('destinos'));
 }