From b06166827f38bb47017526d5ab183a4cb12ed08a Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Tue, 22 Dec 2020 12:03:21 -0500 Subject: [PATCH] Update login form to use the new Inertia form --- resources/js/Pages/Auth/Login.vue | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/resources/js/Pages/Auth/Login.vue b/resources/js/Pages/Auth/Login.vue index 614e28a..26eeb1d 100644 --- a/resources/js/Pages/Auth/Login.vue +++ b/resources/js/Pages/Auth/Login.vue @@ -2,12 +2,12 @@
-
+

Welcome Back!

- - + +
Forget password? - Login + Login
@@ -34,32 +34,14 @@ export default { Logo, TextInput, }, - props: { - errors: Object, - }, data() { return { - sending: false, - form: { + form: this.$inertia.form({ email: 'johndoe@example.com', password: 'secret', remember: null, - }, + }), } }, - methods: { - submit() { - const data = { - email: this.form.email, - password: this.form.password, - remember: this.form.remember, - } - - this.$inertia.post(this.route('login.attempt'), data, { - onStart: () => this.sending = true, - onFinish: () => this.sending = false, - }) - }, - }, }