I'm getting this error.
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
I have a login view with a form, I validate the form with ajax, without a problem. When I try to return a view once I've successfuly logged in.
if ($validation->fails()){
return Response::json(array( 'success' => false, 'errors' => $validation->getMessageBag()->toArray() ));
}else if(Auth::attempt($loginData)){
$usuario=Usuario::find(Input::get('rut'));
return View::make('logged')->with(array('nombre' => $usuario->primer_nombre.' '.$usuario->apellido_paterno.' '.$usuario->apellido_materno,
'rut' => $usuario->id_usuario,
'tipo' => $usuario->id_tipo));
}else{ return Response::json(array( 'exists' => false, 'message' => 'El usuario no existe o la contraseña es inválida.' )); }
I guess the problem is in the last else statement,I get an 404 error.