[Vuejs]-Getting a slug to save in vue

0πŸ‘

It suffices to keep the slug property of your model up to date with the title property.
The cleanest approach here would be a watcher on your title that updates the slug, or by computing model.slug right before you POST it to the server.

0πŸ‘

You can append slug in Model Resource if you are using Laravel

Leave a comment