Last active
October 14, 2017 18:19
-
-
Save Konafets/3b15adff7f472512aeeac7086c74f4ad to your computer and use it in GitHub Desktop.
Translated MyComponent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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