Traveltime tomography, or travel time inversion, has been one of the primary seismological tools for decades and has been used to understand Earth's properties and dynamic processes. An accurate, preferably flexible, eikonal solver to compute the travel time field is at the heart of the inversion process. However, most conventional eikonal solvers suffer from first-order convergence errors and difficulties dealing with irregular computational grids. Physics-informed neural networks (PINNs) have been introduced to tackle these problems and have successfully addressed those challenges. Nevertheless, these approaches still suffer from slow convergence and unstable training dynamics due to the multi-term nature of the loss function. To improve this, we propose a new formulation for the isotropic eikonal equation, which imposes boundary conditions as hard constraints. We employ the theory of functional connections to the traveltime tomography problem, which allows for the use of a single loss term for training the PINN model. Its efficiency, stability, and flexibility in tackling various cases, including topography-dependent and 3D models, are attested through rigorous numerical tests, thus providing an efficient and stable PINN-based traveltime tomography.