From 5ea932ab90ae21d020cdc516ad57462f1ffe9cb6 Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Sat, 27 Feb 2021 07:50:50 -0500 Subject: [PATCH] Fix issue with "remember" boolean on login page --- resources/js/Pages/Auth/Login.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/js/Pages/Auth/Login.vue b/resources/js/Pages/Auth/Login.vue index 26eeb1d..c4d5e80 100644 --- a/resources/js/Pages/Auth/Login.vue +++ b/resources/js/Pages/Auth/Login.vue @@ -2,7 +2,7 @@
-
+

Welcome Back!

@@ -39,9 +39,19 @@ export default { form: this.$inertia.form({ email: 'johndoe@example.com', password: 'secret', - remember: null, + remember: false, }), } }, + methods: { + submit() { + this.form + .transform(data => ({ + ...data, + remember: data.remember ? 'on' : '', + })) + .post(this.route('login.attempt')) + }, + }, }