PHPackages                             stylers/laravel-email-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. stylers/laravel-email-verification

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

stylers/laravel-email-verification
==================================

Model has to verify it's email

0.2.0(2y ago)031MITPHP

Since Sep 19Pushed 2y ago6 watchersCompare

[ Source](https://github.com/stylers-llc/laravel-email-verification)[ Packagist](https://packagist.org/packages/stylers/laravel-email-verification)[ Docs](https://github.com/stylers-llc/laravel-email-verification)[ RSS](/packages/stylers-laravel-email-verification/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (10)Versions (4)Used By (1)

[![Build Status](https://camo.githubusercontent.com/ae0fbb6735b71fc3d1e7e7259713bb69b587edd74776154f0e9fd1d1aab3306c/68747470733a2f2f7472617669732d63692e6f72672f7374796c6572732d6c6c632f6c61726176656c2d656d61696c2d766572696669636174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/stylers-llc/laravel-email-verification)

Laravel Email Verification (non-released)
=========================================

[](#laravel-email-verification-non-released)

TODO
----

[](#todo)

- Release
- Publish on [Packagist](https://packagist.org/)

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

[](#requirements)

- PHP &gt;= 7.1.3
- Laravel ~5.x

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

[](#installation)

```
composer require stylers/laravel-email-verification
```

Publish the assets
------------------

[](#publish-the-assets)

```
php artisan vendor:publish --tag=laravel-mail
php artisan vendor:publish --provider="Themsaid\MailPreview\MailPreviewServiceProvider"
php artisan vendor:publish --provider="Stylers\EmailVerification\Frameworks\Laravel\ServiceProvider"
```

Run the migrations
------------------

[](#run-the-migrations)

```
php artisan migrate
```

Usage
-----

[](#usage)

### Set up the abstraction

[](#set-up-the-abstraction)

```
use Stylers\EmailVerification\NotifiableInterface;
use Illuminate\Notifications\Notifiable;
use Stylers\EmailVerification\EmailVerifiableInterface;
use Stylers\EmailVerification\Frameworks\Laravel\Models\Traits\EmailVerifiable;

class User extends Model implements NotifiableInterface, EmailVerifiableInterface
{
    use Notifiable;
    use EmailVerifiable;
    ...
    public function getName(): string
    {
        return (string)$this->name;
    }
}
```

### Register your listeners to events

[](#register-your-listeners-to-events)

```
// app/Providers/EventServiceProvider.php
protected $listen = [
    ...
    'Stylers\EmailVerification\Frameworks\Laravel\Events\VerificationSuccess' => [
        'your\listener\class1',
        'your\listener\class2',
    ]
];
// OR you can register your listener via Event facade in any ServiceProvider::boot method
Event::listen(
    'Stylers\EmailVerification\Frameworks\Laravel\Events\VerificationSuccess',
    'your\listener\class'
);
```

### Example of generating email-verification-request

[](#example-of-generating-email-verification-request)

Make your own route to create verification-request. Write the code below into the routes/web.php and implement your action

```
Route::post('/email-verification-request', 'AnyController@createEmailVerificationRequest')
    ->name('email-verification-request.create');
```

```
use Stylers\EmailVerification\Frameworks\Laravel\Notifications\EmailVerificationRequestCreate;
use Stylers\EmailVerification\Exceptions\AlreadyVerifiedException;
...
class AnyController extends Controller {
    ...
    public function createRequest(
        Request $request,
        EmailVerificationRequestInterface $emailVerificationService
    )
    {
        $verifiableUser = $notifiableUser = User::first();
        try {
            $verificationRequest = $emailVerificationService->createRequest($verifiableUser->email);
            $emailVerificationService->sendEmail($verificationRequest->getToken(), $notifiableUser);
        } catch (AlreadyVerifiedException $e) {
            // handle exception
        }

        ...
    }
}
```

### Example of verification

[](#example-of-verification)

Make your own verification route. Write the code below into the routes/web.php and implement your action

```
Route::get('/email/verify/{token}', 'AnyController@verifyEmail')
    ->name(config('email-verification.route'));
```

Implement your verifyEmail method in AnyController

```
...
use Stylers\EmailVerification\Exceptions\ExpiredVerificationException;
use Stylers\EmailVerification\Exceptions\AlreadyVerifiedException;
use Stylers\EmailVerification\EmailVerificationServiceInterface;
...
class AnyController extends Controller {
    ...
    public function verifyEmail(
        Request $request,
        EmailVerificationServiceInterface $emailVerificationService
    )
    {
        $token = $request->input('token');
        try {
            $emailVerificationRequest = $emailVerificationService->verify($token);
        } catch(ExpiredVerificationException $e) {
            // expired verification token
        } catch(AlreadyVerifiedException $e) {
            // already verified email
        } catch(\InvalidArgumentException $e) {
            // non-existing token
        }
        ...
        // email verification succeed
    }
}
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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 ~1934 days

Total

2

Last Release

912d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29388728?v=4)[Stylers DevOps](/maintainers/stylers)[@stylers](https://github.com/stylers)

---

Top Contributors

[![rameecam](https://avatars.githubusercontent.com/u/1952172?v=4)](https://github.com/rameecam "rameecam (13 commits)")[![t1k3](https://avatars.githubusercontent.com/u/8018130?v=4)](https://github.com/t1k3 "t1k3 (1 commits)")

---

Tags

laravelemailverifyexpirationverificationstylers

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stylers-laravel-email-verification/health.svg)

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

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M633](/packages/spatie-laravel-medialibrary)[laravel/cashier

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

2.6k30.0M148](/packages/laravel-cashier)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M618](/packages/laravel-scout)[psalm/plugin-laravel

Psalm plugin for Laravel

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

Monitor the health of a Laravel application

87512.0M167](/packages/spatie-laravel-health)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)

PHPackages © 2026

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