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']); } }
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'); } }