Код: Выделить всё
if (Auth::attempt(['mpin' => $otp])) {
$check_otp->update(['otp' => '']);
session()->put('is_login', true);
session()->flash('success', 'Logged In Successfully');
$this->redirectRoute('dashboard', navigate: true);
} else {
$this->dispatch(
'alert',
type: 'error',
message: 'You have entered invalid OTP'
);
return;
}
Подробнее здесь: https://stackoverflow.com/questions/787 ... uthattempt
Мобильная версия