master

laravel/framework

Last updated at: 29/12/2023 09:21

MustVerifyEmail.php

TLDR

This file defines an interface MustVerifyEmail within the Illuminate\Contracts\Auth namespace. The interface specifies four methods related to email verification.

Methods

hasVerifiedEmail

This method determines if the user has verified their email address. It returns a boolean value.

markEmailAsVerified

This method marks the given user's email as verified. It returns a boolean value.

sendEmailVerificationNotification

This method sends the email verification notification.

getEmailForVerification

This method returns the email address that should be used for verification.

<?php

namespace Illuminate\Contracts\Auth;

interface MustVerifyEmail
{
    /**
     * Determine if the user has verified their email address.
     *
     * @return bool
     */
    public function hasVerifiedEmail();

    /**
     * Mark the given user's email as verified.
     *
     * @return bool
     */
    public function markEmailAsVerified();

    /**
     * Send the email verification notification.
     *
     * @return void
     */
    public function sendEmailVerificationNotification();

    /**
     * Get the email address that should be used for verification.
     *
     * @return string
     */
    public function getEmailForVerification();
}