/** * Remove the specified department from storage. */ public function destroy($id) { if (Request::ajax()) { Destino::destroy($id); $output['success'] = 'deleted'; return Response::json($output, 200); } }
/** * Show the form for creating a new translado * * @return Response */ public function Crud() { //simple crud for Article entity $form = DataEdit::source(new Translado()); $form->link("admin/translado/", "Voltar para listagem", "TR")->back(); $form->text('nome_br', 'Nome PT', 'text')->rule('required'); $form->text('nome_en', 'Nome EN', 'text')->rule('required'); $form->textarea('descricao_br', 'Descricao PT'); $form->textarea('descricao_en', 'Descricao EN'); $form->select('destinos_id', 'Pertence ao Destino')->options(Destino::lists("nome_br", "id")); $form->radiogroup('publicado', 'Publicado')->option(0, 'Não')->option(1, 'Sim'); $form->add('imagem', 'Imagem Principal', 'image')->move('uploads/translados/')->fit(900, 500)->preview(260, 180); //$form->text('valor_diaria', 'Valor da diária', 'text'); //$form->text('deposito', 'Valor do depósito de segurança', 'text'); //$form->add('author.name','Author','autocomplete')->search(array('firstname','lastname')); //$form->autocomplete('author.name','Author')->search(array('firstname','lastname')); //->attributes(array('multiple')) $form->build(); return $form->view('admin.translado.crud', compact('form')); }
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')); }
/** * Show the form for editing the specified */ public function edit($id) { $this->data['beneficiariosActive'] = 'active'; $this->data['destinos'] = Destino::lists('destino', 'id'); $this->data['beneficiario'] = Beneficiario::where('beneficiarioID', '=', $id)->get()->first(); $this->data['objetivo'] = Objetivo::find($this->data['beneficiario']->objetivo); $this->data['responsable'] = Personal::where('beneficiarioID', '=', $id)->where('tipoPersonal', '=', 'responsable')->get()->first(); $doc = []; // dd($this->data['responsable']); foreach ($this->data['beneficiario']->getDocuments as $documents) { $doc[$documents->type] = $documents->fileName; } $this->data['documents'] = $doc; $this->data['zonificacion'] = Zonificacion::where('beneficiarioID', '=', $id)->get()->first(); // dd($this->data['responsable'] ); //return $this->data; return View::make('admin.beneficiarios.edit', $this->data); }
/** * Remove the specified destino from storage. * * @param int $id * @return Response */ public function destroy($id) { Destino::destroy($id); return Redirect::route('destinos.index'); }
echo '<option value="">* Selecione</option>'; echo $obj->getComboMunicipio('', $_REQUEST['estado_id']); } elseif ($_REQUEST['query'] == 6) { /** * PREENCHE COMBO SITE MENU BUSCA */ require_once '../../models/siteMenuBusca.php'; $obj = new SiteMenuBusca(); echo '<option value="">* Selecione</option>'; echo $obj->getComboSiteMenuBuscaFilho($_REQUEST['site_menu_busca_pai_id'], ''); } elseif ($_REQUEST['query'] == 7) { /** * PREENCHE COMBO DESTINO */ require_once '../../models/destino.php'; $obj = new Destino(); echo '<option value="">* Selecione</option>'; echo $obj->getComboDestino($_REQUEST['estado_id'], ''); } elseif ($_REQUEST['query'] == 8) { /** * PREENCHE COMBO HOTEL */ require_once '../../models/hotel.php'; $obj = new Hotel(); echo '<option value="">* Selecione</option>'; echo $obj->getComboHotel($_REQUEST['municipio_id'], ''); } elseif ($_REQUEST['query'] == 9) { /** * PREENCHE COMBO HOTEL TARIFARIO */ require_once '../../models/hotelTarifario.php';