From 43365dbbd664b7b14a82da141a7869f4d2bf27bf Mon Sep 17 00:00:00 2001 From: butburg Date: Sun, 4 Aug 2024 19:37:53 +0200 Subject: [PATCH] adding logic for checkbox privacy policy --- .../Http/Controllers/Auth/RegisteredUserController.php | 1 + src/resources/views/auth/register.blade.php | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/Http/Controllers/Auth/RegisteredUserController.php b/src/app/Http/Controllers/Auth/RegisteredUserController.php index b96bc61..994cc5a 100644 --- a/src/app/Http/Controllers/Auth/RegisteredUserController.php +++ b/src/app/Http/Controllers/Auth/RegisteredUserController.php @@ -33,6 +33,7 @@ public function store(Request $request): RedirectResponse 'name' => ['required', 'string', 'max:255', 'unique:' . User::class], 'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:' . User::class], 'password' => ['required', 'confirmed', Rules\Password::defaults()], + 'privacy_policy' => 'accepted', ]); $user = User::create([ diff --git a/src/resources/views/auth/register.blade.php b/src/resources/views/auth/register.blade.php index 3b66eac..eaf4caf 100644 --- a/src/resources/views/auth/register.blade.php +++ b/src/resources/views/auth/register.blade.php @@ -42,11 +42,12 @@
- + id="privacy_policy" name="privacy_policy" type="checkbox" value="1"> +
- +