This commit is contained in:
nurmuhammet committed 2023-12-03 15:04:10 +05:00
1 parent 21aab6ca7d
commit b4521e6f24
3 files changed
+13 -3

No files matched your search

@@ -38,6 +38,9 @@ public function store(Request $request)
$user = User::where('username', $request->username)->first();
// sendSMSVerification($user->phone);
$phone_code = rand(10000, 99999);
$verification = Verification::where(['username' => $user->phone])->first();
$verification ? $verification->update(['code' => $phone_code]) : Verification::create(['username' => $user->phone, 'code' => $phone_code]);
return response()->json([
'step' => 1,
+2 -2
View File
@@ -92,11 +92,11 @@ public function fields(NovaRequest $request): array
NovaInputmask::make(__('Phone'), 'phone')
->mask('+(\\9\\93)-99-99-99-99')
->storeRawValue()
->rules('required', 'integer', 'between:61000000, 71999999'),
->rules('nullable', 'integer', 'between:61000000, 71999999'),
Text::make(__('Email'), 'email')
->sortable()
->rules('required', 'email', 'max:254')
->rules('nullable', 'email', 'max:254')
->creationRules('unique:users,email')
->updateRules('unique:users,email,{{resourceId}}'),