wip
This commit is contained in:
@@ -8,6 +8,15 @@ use Illuminate\Contracts\Validation\ValidationRule;
|
||||
|
||||
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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user