diff --git a/resources/js/Pages/Users/Create.vue b/resources/js/Pages/Users/Create.vue index 73cb882..f28e3d0 100644 --- a/resources/js/Pages/Users/Create.vue +++ b/resources/js/Pages/Users/Create.vue @@ -5,20 +5,20 @@ / Create
-
+
- - - - - + + + + + - +
- Create User + Create User
@@ -41,38 +41,18 @@ export default { TextInput, FileInput, }, - props: { - errors: Object, - }, remember: 'form', data() { return { - sending: false, - form: { + form: this.$inertia.form({ first_name: null, last_name: null, email: null, password: null, owner: false, photo: null, - }, + }), } }, - methods: { - submit() { - const data = new FormData() - data.append('first_name', this.form.first_name || '') - data.append('last_name', this.form.last_name || '') - data.append('email', this.form.email || '') - data.append('password', this.form.password || '') - data.append('owner', this.form.owner ? '1' : '0') - data.append('photo', this.form.photo || '') - - this.$inertia.post(this.route('users.store'), data, { - onStart: () => this.sending = true, - onFinish: () => this.sending = false, - }) - }, - }, }