PHPackages                             jrean/laravel-user-verification - 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. [Framework](/categories/framework)
4. /
5. jrean/laravel-user-verification

ActiveLibrary[Framework](/categories/framework)

jrean/laravel-user-verification
===============================

User Email Verification For Laravel

v13.0.0(1y ago)865843.6k—3.4%113[4 issues](https://github.com/jrean/laravel-user-verification/issues)[3 PRs](https://github.com/jrean/laravel-user-verification/pulls)7MITPHPPHP &gt;=7.2.0CI failing

Since Mar 14Pushed 1y ago20 watchersCompare

[ Source](https://github.com/jrean/laravel-user-verification)[ Packagist](https://packagist.org/packages/jrean/laravel-user-verification)[ RSS](/packages/jrean-laravel-user-verification/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (109)Used By (7)

Laravel User Verification
=========================

[](#laravel-user-verification)

A PHP package built for Laravel to easily handle user verification and email validation.

[![Latest Stable Version](https://camo.githubusercontent.com/7f3e86cdccc2d233108debfe6b48f1bc942bb3073c2f474ffb601e76a205e452/68747470733a2f2f706f7365722e707567782e6f72672f6a7265616e2f6c61726176656c2d757365722d766572696669636174696f6e2f762f737461626c65)](https://packagist.org/packages/jrean/laravel-user-verification)[![Total Downloads](https://camo.githubusercontent.com/4ae64ff9054101cfae3f264d38d75b4cf83b7defe0c8b138c323226b77f2e014/68747470733a2f2f706f7365722e707567782e6f72672f6a7265616e2f6c61726176656c2d757365722d766572696669636174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/jrean/laravel-user-verification)[![License](https://camo.githubusercontent.com/deb336c86ba9ca369a268b11d75d347b205a78440381b3a37d256b045c55ba19/68747470733a2f2f706f7365722e707567782e6f72672f6a7265616e2f6c61726176656c2d757365722d766572696669636174696f6e2f6c6963656e7365)](https://packagist.org/packages/jrean/laravel-user-verification)

Features
--------

[](#features)

- Generate and store verification tokens for registered users
- Send or queue verification emails with token links
- Handle token verification process
- Set users as verified
- Relaunch the verification process anytime

Laravel Compatibility
---------------------

[](#laravel-compatibility)

Laravel VersionPackage Version5.0.\* - 5.2.\*[2.2](https://github.com/jrean/laravel-user-verification/tree/2.2)5.3.\*[3.0](https://github.com/jrean/laravel-user-verification/tree/3.0)5.4.\*[4.1](https://github.com/jrean/laravel-user-verification/tree/4.1)5.5.\*[5.0](https://github.com/jrean/laravel-user-verification/tree/5.0)5.6.\*[6.0](https://github.com/jrean/laravel-user-verification/tree/6.0)5.7.\* - 5.8.\*[7.0](https://github.com/jrean/laravel-user-verification/tree/7.0)6.0.\*[8.0](https://github.com/jrean/laravel-user-verification/tree/8.0)7.0.\* - 11.0.\*Use [master](https://github.com/jrean/laravel-user-verification/tree/master) or check below:7.0.\*[master](https://github.com/jrean/laravel-user-verification/tree/master)8.0.\*[9.0](https://github.com/jrean/laravel-user-verification/tree/9.0)9.0.\*[10.0](https://github.com/jrean/laravel-user-verification/tree/10.0)10.0.\*[11.0](https://github.com/jrean/laravel-user-verification/tree/11.0)11.0.\*[12.0](https://github.com/jrean/laravel-user-verification/tree/12.0)12.0.\*[13.0](https://github.com/jrean/laravel-user-verification/tree/13.0)**This package is now Laravel 12.0 compliant with v13.0.0.**

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

[](#installation)

### Via Composer

[](#via-composer)

```
composer require jrean/laravel-user-verification
```

### Register Service Provider &amp; Facade

[](#register-service-provider--facade)

Add the service provider to `config/app.php`. Make sure to add it **above** the `RouteServiceProvider`.

```
'providers' => [
    // ...
    Jrean\UserVerification\UserVerificationServiceProvider::class,
    // ...
    App\Providers\RouteServiceProvider::class,
],
```

Optionally, add the facade:

```
'aliases' => [
    // ...
    'UserVerification' => Jrean\UserVerification\Facades\UserVerification::class,
],
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="Jrean\UserVerification\UserVerificationServiceProvider" --tag="config"
```

Database Configuration
----------------------

[](#database-configuration)

The package requires adding two columns to your users table: `verified` and `verification_token`.

### Run Migrations

[](#run-migrations)

```
php artisan migrate --path="/vendor/jrean/laravel-user-verification/src/resources/migrations"
```

Or publish and customize the migrations:

```
php artisan vendor:publish --provider="Jrean\UserVerification\UserVerificationServiceProvider" --tag="migrations"
```

Middleware
----------

[](#middleware)

### Default Middleware

[](#default-middleware)

Register the included middleware in `app/Http/Kernel.php`:

```
protected $routeMiddleware = [
    // ...
    'isVerified' => \Jrean\UserVerification\Middleware\IsVerified::class,
];
```

Apply it to routes:

```
Route::group(['middleware' => ['isVerified']], function () {
    // Protected routes...
});
```

### Custom Middleware

[](#custom-middleware)

```
php artisan make:middleware IsVerified
```

Email Configuration
-------------------

[](#email-configuration)

### Default Email View

[](#default-email-view)

The package includes a basic email template. The view receives a `$user` variable containing user details and the verification token.

### Customize Email View

[](#customize-email-view)

Publish the views:

```
php artisan vendor:publish --provider="Jrean\UserVerification\UserVerificationServiceProvider" --tag="views"
```

The views will be available in `resources/views/vendor/laravel-user-verification/`.

### Markdown Email Support

[](#markdown-email-support)

To use Markdown instead of Blade templates, update the `user-verification.php` config:

```
'email' => [
    'type' => 'markdown',
],
```

### Email Sending Methods

[](#email-sending-methods)

```
// Send immediately
UserVerification::send($user, 'Email Verification');

// Queue for sending
UserVerification::sendQueue($user, 'Email Verification');

// Send later
UserVerification::sendLater($seconds, $user, 'Email Verification');
```

Usage
-----

[](#usage)

### Routes

[](#routes)

The package provides two default routes:

```
Route::get('email-verification/error', 'Auth\RegisterController@getVerificationError')->name('email-verification.error');
Route::get('email-verification/check/{token}', 'Auth\RegisterController@getVerification')->name('email-verification.check');
```

### Required Trait

[](#required-trait)

Add the `VerifiesUsers` trait to your registration controller:

```
use Jrean\UserVerification\Traits\VerifiesUsers;

class RegisterController extends Controller
{
    use RegistersUsers, VerifiesUsers;

    // ...
}
```

### Integration Example

[](#integration-example)

Here's a typical implementation in `RegisterController.php`:

```
public function register(Request $request)
{
    $this->validator($request->all())->validate();

    $user = $this->create($request->all());

    event(new Registered($user));

    $this->guard()->login($user);

    UserVerification::generate($user);
    UserVerification::send($user, 'Please Verify Your Email');

    return $this->registered($request, $user)
                    ?: redirect($this->redirectPath());
}
```

### Auto-Login After Verification

[](#auto-login-after-verification)

Enable auto-login after verification in the config:

```
'auto-login' => true,
```

### Translations

[](#translations)

Publish translation files:

```
php artisan vendor:publish --provider="Jrean\UserVerification\UserVerificationServiceProvider" --tag="translations"
```

API Reference
-------------

[](#api-reference)

### Core Methods

[](#core-methods)

- `generate(AuthenticatableContract $user)` - Generate and save a verification token
- `send(AuthenticatableContract $user, $subject = null, $from = null, $name = null)` - Send verification email
- `process($email, $token, $userTable)` - Process the token verification

### Model Traits

[](#model-traits)

Add the `UserVerification` trait to your User model for these methods:

- `isVerified()` - Check if user is verified
- `isPendingVerification()` - Check if verification is pending

Error Handling
--------------

[](#error-handling)

The package throws the following exceptions:

- `ModelNotCompliantException`
- `TokenMismatchException`
- `UserIsVerifiedException`
- `UserNotVerifiedException`
- `UserNotFoundException`
- `UserHasNoEmailException`

License
-------

[](#license)

Laravel User Verification is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance46

Moderate activity, may be stable

Popularity61

Solid adoption and visibility

Community37

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 90.7% of commits — single point of failure

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 ~31 days

Recently: every ~285 days

Total

108

Last Release

419d ago

Major Versions

2.2.x-dev → v9.0.02020-09-23

v9.0.0 → v10.0.02022-02-09

v10.0.0 → 11.0.x-dev2023-02-16

v11.0.0 → v12.0.02024-07-02

v12.0.0 → v13.0.02025-03-25

PHP version history (5 changes)v1.0PHP &gt;=5.5.9

v3.0.0PHP &gt;=5.6.4

v5.0.0PHP &gt;=7.0.0

v6.0.0PHP &gt;=7.1.3

V8.0.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d273f62b800c2e379e91909cd05059433096eca59b30027121ca347bd08492b2?d=identicon)[jrean](/maintainers/jrean)

---

Top Contributors

[![jrean](https://avatars.githubusercontent.com/u/5646128?v=4)](https://github.com/jrean "jrean (301 commits)")[![DariusIII](https://avatars.githubusercontent.com/u/3399658?v=4)](https://github.com/DariusIII "DariusIII (8 commits)")[![tshafer](https://avatars.githubusercontent.com/u/299464?v=4)](https://github.com/tshafer "tshafer (3 commits)")[![vinothkannans](https://avatars.githubusercontent.com/u/9372109?v=4)](https://github.com/vinothkannans "vinothkannans (3 commits)")[![Clowting](https://avatars.githubusercontent.com/u/7937079?v=4)](https://github.com/Clowting "Clowting (2 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![mhanoglu](https://avatars.githubusercontent.com/u/8195419?v=4)](https://github.com/mhanoglu "mhanoglu (1 commits)")[![naneri](https://avatars.githubusercontent.com/u/5573469?v=4)](https://github.com/naneri "naneri (1 commits)")[![percymamedy](https://avatars.githubusercontent.com/u/11259669?v=4)](https://github.com/percymamedy "percymamedy (1 commits)")[![rob-union](https://avatars.githubusercontent.com/u/15341419?v=4)](https://github.com/rob-union "rob-union (1 commits)")[![SiiXFX](https://avatars.githubusercontent.com/u/8012245?v=4)](https://github.com/SiiXFX "SiiXFX (1 commits)")[![slowkow](https://avatars.githubusercontent.com/u/209714?v=4)](https://github.com/slowkow "slowkow (1 commits)")[![sobhanatar](https://avatars.githubusercontent.com/u/1507325?v=4)](https://github.com/sobhanatar "sobhanatar (1 commits)")[![lloy0076](https://avatars.githubusercontent.com/u/1174532?v=4)](https://github.com/lloy0076 "lloy0076 (1 commits)")[![chil360](https://avatars.githubusercontent.com/u/3837011?v=4)](https://github.com/chil360 "chil360 (1 commits)")[![DCzajkowski](https://avatars.githubusercontent.com/u/4501047?v=4)](https://github.com/DCzajkowski "DCzajkowski (1 commits)")[![gpressutto5](https://avatars.githubusercontent.com/u/12385501?v=4)](https://github.com/gpressutto5 "gpressutto5 (1 commits)")[![Konafets](https://avatars.githubusercontent.com/u/363363?v=4)](https://github.com/Konafets "Konafets (1 commits)")[![blueclock](https://avatars.githubusercontent.com/u/586174?v=4)](https://github.com/blueclock "blueclock (1 commits)")

---

Tags

email-validationemail-verificationlaravellaravel-packagelaravel10laravel11laravel12laravel5laravel5-packagelaravel6laravel6-packagelaravel7laravel8laravel9user-validationuser-verificationframeworklaravelemail-verificationuser verificationuser activationemail activation

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/jrean-laravel-user-verification/health.svg)

```
[![Health](https://phpackages.com/badges/jrean-laravel-user-verification/health.svg)](https://phpackages.com/packages/jrean-laravel-user-verification)
```

###  Alternatives

[rebing/graphql-laravel

Laravel wrapper for PHP GraphQL

2.2k7.1M26](/packages/rebing-graphql-laravel)[graham-campbell/markdown

Markdown Is A CommonMark Wrapper For Laravel

1.3k7.1M64](/packages/graham-campbell-markdown)[graham-campbell/manager

Manager Provides Some Manager Functionality For Laravel

39221.1M134](/packages/graham-campbell-manager)[laravel-lang/publisher

Localization publisher for your Laravel application

2167.7M24](/packages/laravel-lang-publisher)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[lanin/laravel-api-debugger

Easily debug your JSON API.

2311.8M](/packages/lanin-laravel-api-debugger)

PHPackages © 2026

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