/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Auth/MustVerifyEmail.php
62 строки
1 KB
Ali Khosrojerdi
[12.x]Feat(MustVerifyEmail): add markEmailAsNotVerified() (#58255)
03 янв 2026, 21:20
Не верифицирован
03 янв 2026, 21:20
9fcf2fd
Код
Авторство
О чём код?
<?php namespace Illuminate\Auth; use Illuminate\Auth\Notifications\VerifyEmail; trait MustVerifyEmail { /** * Determine if the user has verified their email address. * * @return bool */ public function hasVerifiedEmail() { return ! is_null($this->email_verified_at); } /** * Mark the user's email as verified. * * @return bool */ public function markEmailAsVerified() { return $this->forceFill([ 'email_verified_at' => $this->freshTimestamp(), ])->save(); } /** * Mark the user's email as unverified. * * @return bool */ public function markEmailAsUnverified() { return $this->forceFill([ 'email_verified_at' => null, ])->save(); } /** * Send the email verification notification. * * @return void */ public function sendEmailVerificationNotification() { $this->notify(new VerifyEmail); } /** * Get the email address that should be used for verification. * * @return string */ public function getEmailForVerification() { return $this->email; } }