PHPackages                             beyondcode/laravel-confirm-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. beyondcode/laravel-confirm-email

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

beyondcode/laravel-confirm-email
================================

Add email verification to your Laravel projects.

2.5.0(3mo ago)55357.0k↓65.6%55MITPHPPHP ^7.3|^8.0CI failing

Since Apr 30Pushed 3mo ago13 watchersCompare

[ Source](https://github.com/beyondcode/laravel-confirm-email)[ Packagist](https://packagist.org/packages/beyondcode/laravel-confirm-email)[ Docs](https://github.com/beyondcode/laravel-confirm-email)[ RSS](/packages/beyondcode-laravel-confirm-email/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (14)Versions (19)Used By (0)

Laravel Email Confirmation
==========================

[](#laravel-email-confirmation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e14a60002e6875872f3412a7c11d19bf577017d34affa7fc6282b4236ce2b4f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6265796f6e64636f64652f6c61726176656c2d636f6e6669726d2d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/beyondcode/laravel-confirm-email)[![Total Downloads](https://camo.githubusercontent.com/1463bd66a82d4ff863f3e3924f67217a19ccf97c72e0f712ffb9071796b7d9fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6265796f6e64636f64652f6c61726176656c2d636f6e6669726d2d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/beyondcode/laravel-confirm-email)

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

[](#installation)

You can install the package via composer:

```
composer require beyondcode/laravel-confirm-email
```

Usage
-----

[](#usage)

This package adds a `confirmed_at` and `confirmation_code` field to your users table. Publish the migration and the configuration file using

```
php artisan vendor:publish --provider="BeyondCode\EmailConfirmation\EmailConfirmationServiceProvider"
```

And run the migrations:

```
php artisan migrate
```

### Configuring the login, register and forgot password controllers

[](#configuring-the-login-register-and-forgot-password-controllers)

In order to make use of the email verification, replace the `AuthenticatesUsers`, `RegistersUsers` and the `SendsPasswordResetEmails` traits that come with Laravel, with the ones provided by this package.

These traits can be found in these three files:

- `App\Http\Controllers\Auth\LoginController`
- `App\Http\Controllers\Auth\RegisterController`
- `App\Http\Controllers\Auth\ForgotPasswordController`

### Add the confirmation and resend routes

[](#add-the-confirmation-and-resend-routes)

Add the following two routes to your `routes/web.php` file:

```
Route::name('auth.resend_confirmation')->get('/register/confirm/resend', 'Auth\RegisterController@resendConfirmation');
Route::name('auth.confirm')->get('/register/confirm/{confirmation_code}', 'Auth\RegisterController@confirm');
```

### Show confirmation messages

[](#show-confirmation-messages)

This packages adds some flash messages that contain error/information messages for your users. To show them to your users, add this to your `login.blade.php`:

```
@if (session('confirmation'))

        {!! session('confirmation') !!}

@endif
```

and this to both your `login.blade.php` and `email.blade.php`

```
@if ($errors->has('confirmation') > 0 )

        {!! $errors->first('confirmation') !!}

@endif
```

### Customization

[](#customization)

This package comes with a language file, that allows you to modify the error / confirmation messages that your user might see. In addition to that, you can change the notification class that will be used to send the confirmation code completely, by changing it in the `config/confirmation.php` file.

### Change redirect routes

[](#change-redirect-routes)

You can change all possible redirect routes by including these values either as properties in your registration controller, or as methods returning the route/URL string:

- `redirectConfirmationTo`
- `redirectAfterRegistrationTo`
- `redirectAfterResendConfirmationTo`

They all default to `route('login')`.

### The Confirmed Event

[](#the-confirmed-event)

On successful email confirmation, this package dispatches a `Confirmed` event, in order for you to conveniently handle any custom logic, such as sending a welcome email or automatically logging the user in.

Simply add the `Confirmed` event, and your listeners, to the `EventServiceProvider` in your application:

```
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        'BeyondCode\EmailConfirmation\Events\Confirmed' => [
            'App\Listeners\YourOnConfirmedListener'
        ]
    ];
```

For more information about registering events and listeners, please refer to the [Laravel docs](https://laravel.com/docs/events#registering-events-and-listeners).

Catch, test and debug application mails with Laravel Herd
---------------------------------------------------------

[](#catch-test-and-debug-application-mails-with-laravel-herd)

Laravel Herd provides an integrated local email service, streamlining the process of testing and debugging application emails. The email service organizes emails into distinct inboxes for each application, ensuring they are easily accessible and simple to locate.

[herd.laravel.com](https://herd.laravel.com)

[![image](https://private-user-images.githubusercontent.com/26432041/420261151-6417907c-119d-43ac-9cf6-5638bafae24f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODYxMjAsIm5iZiI6MTc4Mjk4NTgyMCwicGF0aCI6Ii8yNjQzMjA0MS80MjAyNjExNTEtNjQxNzkwN2MtMTE5ZC00M2FjLTljZjYtNTYzOGJhZmFlMjRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDA5NTAyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwNjVmYmNlYTJjYjQ3NWFmY2MxNTUyYTU0N2UwOGRjOThlYThmM2Q2MzA4YjU2NGVjNmExYjBjN2Y2MWY0NjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.p1RTh1Au5Z3_uURio6WkvDNrjGq3fDvh-WiQ7GMPmQk)](https://private-user-images.githubusercontent.com/26432041/420261151-6417907c-119d-43ac-9cf6-5638bafae24f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODYxMjAsIm5iZiI6MTc4Mjk4NTgyMCwicGF0aCI6Ii8yNjQzMjA0MS80MjAyNjExNTEtNjQxNzkwN2MtMTE5ZC00M2FjLTljZjYtNTYzOGJhZmFlMjRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDA5NTAyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwNjVmYmNlYTJjYjQ3NWFmY2MxNTUyYTU0N2UwOGRjOThlYThmM2Q2MzA4YjU2NGVjNmExYjBjN2Y2MWY0NjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.p1RTh1Au5Z3_uURio6WkvDNrjGq3fDvh-WiQ7GMPmQk)

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Marcel Pociot](https://github.com/mpociot)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance81

Actively maintained with recent releases

Popularity50

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~221 days

Recently: every ~443 days

Total

14

Last Release

102d ago

Major Versions

1.6.1 → 2.0.02020-07-02

PHP version history (2 changes)1.0.0PHP ^7.1

2.1.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/863e91ca13b8c4031f202c0eee4f06b3a4352f92cf9cd397b03609b20247ed16?d=identicon)[beyondcode](/maintainers/beyondcode)

---

Top Contributors

[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (25 commits)")[![mechelon](https://avatars.githubusercontent.com/u/26432041?v=4)](https://github.com/mechelon "mechelon (11 commits)")[![rickwest](https://avatars.githubusercontent.com/u/24735291?v=4)](https://github.com/rickwest "rickwest (9 commits)")[![sschlein](https://avatars.githubusercontent.com/u/2911113?v=4)](https://github.com/sschlein "sschlein (2 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")[![chapeupreto](https://avatars.githubusercontent.com/u/834048?v=4)](https://github.com/chapeupreto "chapeupreto (1 commits)")[![colinmackinlay](https://avatars.githubusercontent.com/u/7833362?v=4)](https://github.com/colinmackinlay "colinmackinlay (1 commits)")[![kslr](https://avatars.githubusercontent.com/u/5516323?v=4)](https://github.com/kslr "kslr (1 commits)")[![BrandonSurowiec](https://avatars.githubusercontent.com/u/5625680?v=4)](https://github.com/BrandonSurowiec "BrandonSurowiec (1 commits)")

---

Tags

beyondcodelaravel-confirm-email

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/beyondcode-laravel-confirm-email/health.svg)

```
[![Health](https://phpackages.com/badges/beyondcode-laravel-confirm-email/health.svg)](https://phpackages.com/packages/beyondcode-laravel-confirm-email)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M131](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
