diff --git a/app/Http/Controllers/UserProfileController.php b/app/Http/Controllers/UserProfileController.php index 9d0411c..ecc7c1d 100644 --- a/app/Http/Controllers/UserProfileController.php +++ b/app/Http/Controllers/UserProfileController.php @@ -12,7 +12,7 @@ public function store(Request $request) { $request->validate([ 'name' => 'required|string|max:255', - 'email' => 'required|email|max:255|unique:user_profiles,email', + 'email' => 'required|email|max:255', 'gender' => 'required|in:laki-laki,perempuan', 'day' => 'required|integer|min:1|max:31', 'month' => 'required|integer|min:1|max:12', diff --git a/database/migrations/2026_06_27_000000_drop_unique_email_from_user_profiles.php b/database/migrations/2026_06_27_000000_drop_unique_email_from_user_profiles.php new file mode 100644 index 0000000..84da3d8 --- /dev/null +++ b/database/migrations/2026_06_27_000000_drop_unique_email_from_user_profiles.php @@ -0,0 +1,29 @@ +dropUnique('user_profiles_email_unique'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('user_profiles', function (Blueprint $table) { + $table->unique('email'); + }); + } +};