In this tutorial we're going to learn how to use v-model attribute with custom components to return the values of the custom component back to the parent component. The v-model attribute is a way of creating a two way binding between the user input and the vuejs component.

The component will then have a data property of message to record the same value the user entered.

In this section we'll look at what the v-model property does and how we can change the custom component to make this work.

Now we can use the v-model and it will change the data property of the parent component like this
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners