public function get_paso3($var) { if (Session::has('exp_id') && $var > 0) { $experiencia_id = Session::get('exp_id'); $experiencia = Testimonio::find($experiencia_id); if (!$experiencia) { return Response::error(404); } $experiencia->amenaza_id = $var; $experiencia->save(); Session::put('experiencia', $experiencia); //Formatea el array para el select $comunaList = Comuna::order_by('nombre')->get(); $comunaArray = array('0' => 'Seleccione'); foreach ($comunaList as $comuna) { $comunaArray[$comuna->id] = $comuna->nombre; } return View::make('home.paso3')->with('comunasSelect', $comunaArray); } else { //retorno pagina de inicio return Redirect::to('/'); } }
@layout('default') @section('content') <div id="gallery"> <?php $testimonioList = Testimonio::order_by('id')->get(); foreach ($testimonioList as $testimonio) { echo '<a style="font-size:small;" href="images/img/' . $testimonio->id . '_large.png" rel="lightbox" title="<small>' . $testimonio->relato . '<b></br>' . $testimonio->cifra . '</b> </br> <p>Fuente: ' . $testimonio->fuente . '</p></small>"><img src="images/img/' . $testimonio->id . '.png" title=" "></a>'; } ?> </div> <center> <h1><a href="/expresate/paso1"> ¿Tú también tienes una historia?</a></h1> </center> @endsection