This commit is contained in:
nurmuhammet committed 2023-12-03 14:43:41 +05:00
1 parent 09609ef849
commit 21aab6ca7d
6 files changed
+113 -28

No files matched your search

+10 -1
View File
@@ -8,6 +8,15 @@
class PhoneCodeVerification implements ValidationRule
{
/**
* @param int|string $phone
*/
public function __construct(
protected int|string $phone,
) {
}
/**
* Run the validation rule.
*
@@ -15,7 +24,7 @@ class PhoneCodeVerification implements ValidationRule
*/
public function validate(string $attribute, mixed $value, Closure $fail): void
{
$verification = Verification::where('username', auth()->user()->phone)
$verification = Verification::where('username', $this->phone)
->where('code', $value)
->first();