Skip to content

Instantly share code, notes, and snippets.

@Konafets
Last active October 14, 2017 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Konafets/3b15adff7f472512aeeac7086c74f4ad to your computer and use it in GitHub Desktop.
Save Konafets/3b15adff7f472512aeeac7086c74f4ad to your computer and use it in GitHub Desktop.
Translated MyComponent
<template>
<div>
<h1>{{ $t('users.edit') }} {{ user.name }}</h1>
<form method="post" action="{{ updateRoute }}">
<input hidden name="_token" :value="csrfToken">
<input name="_method" type="hidden" value="PATCH">
<!-- Some form fields -->
<button type="submit">{{ $t('button.update') }}</button>
</form>
</div>
</template>
<script>
export default {
name: 'my-component',
props: {
csrfToken: {
type: String,
required: true,
},
user: {
type: Object,
required: true,
},
updateRoute: {
type: String,
required: true,
}
},
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment