Laravel Backends for Vue.js 3 and Nuxt
Plans from $25/month

This lesson is for members. Join us?

Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.

Format the User Data Once

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.