Ejemplo n.º 1
0
 public function search()
 {
     $modalidad = Modalidad::lists('id', 'monto');
     $pago = Pagos::max('id');
     $id = Input::get('id_cliente');
     if (is_null($id) or !is_numeric($id)) {
         return Redirect::to('404.html');
     } else {
         $cliente = Cliente::where('id', '=', $id)->firstOrFail();
         if (is_object($cliente)) {
             return View::make('pagos.showCliente', array('cliente' => $cliente, 'modalidad' => $modalidad, 'pago' => $pago));
             //return Redirect::to('pagos/create')->withErrors($respuesta['mensaje'] )->withInput();
             //return Redirect::to('pagos/create/',array('cliente'=>$cliente,'modalidad'=>$modalidad));
         } else {
             return Redirect::to('404.html');
         }
     }
 }