In this lesson, we create a getUser
function within the useAuth
composable to fetch the user data and format it with proper Date
data types where applicable. This makes accessing our user data consistent and predictable.
You can think of what we’ve done here something like using casts or accessors in Laravel models.