checkAuth()) { return redirect()->intended('/login'); } $user = auth()->user(); $inertiaProvider = new InertiaProvider('UserManagement/Profile', [ 'username' => $user->username, ]); return $inertiaProvider->render(); } }