PHPackages                             protonemedia/laravel-verify-new-email - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. protonemedia/laravel-verify-new-email

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

protonemedia/laravel-verify-new-email
=====================================

Package to handle email address updates and verification

v1.13.0(1y ago)414217.9k↑18.3%30[6 PRs](https://github.com/protonemedia/laravel-verify-new-email/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Dec 30Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/protonemedia/laravel-verify-new-email)[ Packagist](https://packagist.org/packages/protonemedia/laravel-verify-new-email)[ Docs](https://github.com/protonemedia/laravel-verify-new-email)[ GitHub Sponsors](https://github.com/pascalbaljet)[ RSS](/packages/protonemedia-laravel-verify-new-email/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (31)Used By (0)

Laravel Verify New Email
========================

[](#laravel-verify-new-email)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ac917ee45fab4beadd60f4cb135ca023890e298e4f54e815dd4f8bc704c2eb50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726f746f6e656d656469612f6c61726176656c2d7665726966792d6e65772d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/protonemedia/laravel-verify-new-email)[![run-tests](https://github.com/protonemedia/laravel-verify-new-email/workflows/run-tests/badge.svg)](https://github.com/protonemedia/laravel-verify-new-email/workflows/run-tests/badge.svg)[![Quality Score](https://camo.githubusercontent.com/55b8a05e3b5b465a5e6b019aadb4dbf16b43fd527b7ac8239b417350364f8109/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f70726f746f6e656d656469612f6c61726176656c2d7665726966792d6e65772d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/protonemedia/laravel-verify-new-email)[![Total Downloads](https://camo.githubusercontent.com/73287b45bf38841851e90fdc70dfa86809c7095c6e56cc7796f0f218418b3bc1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70726f746f6e656d656469612f6c61726176656c2d7665726966792d6e65772d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/protonemedia/laravel-verify-new-email)

Laravel supports verifying email addresses out of the box. This package adds support for verifying *new* email addresses. When a user updates its email address, it won't replace the old one until the new one is verified. Super easy to set up, still fully customizable. If you want it can be used as a drop-in replacement for the built-in Email Verification features as this package supports unauthenticated verification and auto-login. Support for Laravel 9.0 and higher and requires PHP 8.2 or higher.

Sponsor Us
----------

[](#sponsor-us)

[![](https://camo.githubusercontent.com/b5348f68e9a1a6ff90432d75a6692be1d604b3320ce1fcabd4b1ef29668053c4/68747470733a2f2f696e657274696175692e636f6d2f76697369742d636172642e6a7067)](https://inertiaui.com/inertia-table?utm_source=github&utm_campaign=laravel-verify-new-email)

❤️ We proudly support the community by developing Laravel packages and giving them away for free. If this package saves you time or if you're relying on it professionally, please consider [sponsoring the maintenance and development](https://github.com/sponsors/pascalbaljet) and check out our latest premium package: [Inertia Table](https://inertiaui.com/inertia-table?utm_source=github&utm_campaign=laravel-verify-new-email). Keeping track of issues and pull requests takes time, but we're happy to help!

Blogpost
--------

[](#blogpost)

If you want to know more about the background of this package, please read [the blog post](https://protone.media/en/blog/an-add-on-to-laravels-built-in-email-verification-only-update-a-users-email-address-if-the-new-one-is-verified-as-well).

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 10 or higher

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require protonemedia/laravel-verify-new-email
```

Configuration
-------------

[](#configuration)

Publish the database migration, config file and email view:

```
php artisan vendor:publish --provider="ProtoneMedia\LaravelVerifyNewEmail\ServiceProvider"
```

You can set the redirect path in the `verify-new-email.php` config file. The user will be redirected to this path after verification.

The expire time of the verification URLs can be changed by updating the `auth.verification.expire` setting and defaults to 60 minutes.

Usage
-----

[](#usage)

Add the `MustVerifyNewEmail` trait to your `User` model and make sure it implements the framework's `MustVerifyEmail` interface as well.

```
