add visa/master module
This commit is contained in:
1 parent
be39810f62
commit
837d2a4704
17 files changed
+476
-17
No files matched your search
@@ -9,7 +9,7 @@
|
||||
class PhoneCodeVerification implements ValidationRule
|
||||
{
|
||||
public function __construct(
|
||||
protected int|string $phone,
|
||||
protected null|int|string $phone,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -19,6 +19,12 @@ public function __construct(
|
||||
*/
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
if (is_null($this->phone)) {
|
||||
$fail(__('Could not parse phone number'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$verification = Verification::where('username', $this->phone)
|
||||
->where('code', $value)
|
||||
->first();
|
||||
|
||||
Reference in new issue
Block a user