V
Size: a a a
V
m
B
D
D
ПЛ
B
public function enablePhoneAuth(): void
{
if (!empty($this->phone) && !$this->isPhoneVerified()) {
throw new \DomainException('Phone number is empty.');
}
$this->phone_auth = true;
$this->saveOrFail();
}
AP
B
B
B
AP
B
AP
B
B
AP
ПЛ
B
public function auth(){
$user = Auth::user();
if ($user->isPhoneAuthEnabled()) {
$user->disablePhoneAuth();
} else {
$user->enablePhoneAuth();
}
}