add visa/master module
This commit is contained in:
@@ -9,7 +9,7 @@ use Illuminate\Contracts\Validation\ValidationRule;
|
||||
class PhoneCodeVerification implements ValidationRule
|
||||
{
|
||||
public function __construct(
|
||||
protected int|string $phone,
|
||||
protected null|int|string $phone,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -19,6 +19,12 @@ class PhoneCodeVerification implements ValidationRule
|
||||
*/
|
||||
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