Add User Email Confirmation to Your Laravel Projects

Add User Email Confirmation to Your Laravel Projects

If you want to add an email verification step to user registration in your Laravel Projects, Marcel Pociot has a new package aptly named laravel-confirm-email. New users are required to confirm their registration through an email to proceed.

The package works by providing two traits that replace the AuthenticatesUsers and RegistersUsers that come with Laravel. After registering, users are required to confirm their account via email.

To get started, install the package via Composer:

composer require beyondcode/laravel-confirm-email

This package requires a database migration, which you need to get by running the vendor:publish command:

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

You’ll also need to add two new routes to handle the confirmations, and the package also comes with a language file that you can tweak as well as a configurable notification class used (if you publish the config):


return [
    | Notification
    | This is the notification class that will be sent to users when they receive
    | a confirmation code.
    'notification' => \BeyondCode\EmailConfirmation\Notifications\ConfirmEmail::class,

Learn more about this package by checking out the Official GitHub repository and follow the readme for complete installation and usage instructions.

Filed in: News
Laravel News Partners

Laravel Jobs

Backend Software Engineer (PHP Developer)
Austin TX, Bonita Springs FL
Certified eSupport Corp
Laravel Developer
Glendale, CA (COVID Remote)
Jogg, Inc
Full-Stack Engineer (Mid to Senior)
Remote (EST, CST)
Senior Laravel Developer (AI Applications)
Remote from anywhere in the UK or from our London office
GreenShoot Labs
Full Stack Engineer


Join 31,000+ others and never miss out on new tips, tutorials, and more.