public static function confirm(string $token, string $email)
    {
        $user = static::where('confirmation_token', $token)
            ->where('verified', false)
            ->where('email', $email)
            ->firstOrFail();

        $user->verified = true;
        $user->save();

        return $user;
    }
public static function confirm(string $token, string $email)
    {
        $user = static::where('confirmation_token', $token)
            ->where('verified', false)
            ->where('email', $email)
            ->firstOrFail();

        $user->verified = true;
        $user->save();

        return $user;
    }
public static function confirm ( string $ token , string $ email ) { $ user = static :: where ( 'confirmation_token' , $ token ) -> where ( 'verified' , false ) -> where ( 'email' , $ email ) -> firstOrFail ( ) ; $ user -> verified = true ; $ user -> save ( ) ; return $ user ; }
Confirms the user related to the given token & email.

@param string $token
@param string $email

@return self
Confirms the user related to the given token & email .