Beispiel #1
0
 public function insertC()
 {
     $respuesta = Tcliente::agregar(Input::all());
     if ($respuesta['error'] == true) {
         return Redirect::to('personal/addC.html')->withErrors($respuesta['mensaje'])->withInput();
     } else {
         return Redirect::to('personal')->with('mensaje', $respuesta['mensaje']);
     }
 }
Beispiel #2
0
 public function profile($cod)
 {
     $cliente = Tcliente::where('idcliente', '=', $cod)->firstOrFail();
     if (is_object($cliente)) {
         return View::make('cliente.profile', array('cliente' => $cliente));
     } else {
         return Redirect::to('404.html');
     }
 }