PHPackages                             ntavelis/auth-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. [CLI &amp; Console](/categories/cli)
4. /
5. ntavelis/auth-email

ActiveLibrary[CLI &amp; Console](/categories/cli)

ntavelis/auth-email
===================

Generates Email Authentication in Laravel &gt;= 5.4 on top of artisan's make:auth command.

v1.4.0(8y ago)104252MITPHPPHP &gt;=5.6.4

Since Feb 5Pushed 8y ago2 watchersCompare

[ Source](https://github.com/ntavelis/auth-email)[ Packagist](https://packagist.org/packages/ntavelis/auth-email)[ Docs](https://github.com/ntavelis/auth-email)[ RSS](/packages/ntavelis-auth-email/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (0)

Laravel auth-email
==================

[](#laravel-auth-email)

[![Latest Stable Version](https://camo.githubusercontent.com/ef4cb727b6bfd124120f7715e05e2b3cdaa7ff7aa1367a7684f845ecf6acbf4f/68747470733a2f2f706f7365722e707567782e6f72672f6e746176656c69732f617574682d656d61696c2f762f737461626c65)](https://packagist.org/packages/ntavelis/auth-email)[![License](https://camo.githubusercontent.com/04a1c9e02684232726fdb809d612ac2aa2726792bc88ec8d73aa4991a10cd8fd/68747470733a2f2f706f7365722e707567782e6f72672f6e746176656c69732f617574682d656d61696c2f6c6963656e7365)](https://packagist.org/packages/ntavelis/auth-email)

Auth-email provides out of the box email authentication for your Laravel &gt;=5.4 application. It leverages the Laravel's functionality provided by the `make:auth` command, which runs for you and then proceeds to configure email authentication. Which means that every user that registers to your application, will receive an email with an activate account button. He will have to click the activate account, in order to prove that he is the owner of the email and therefore activate his account.

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

[](#installation)

Via Composer

```
$ composer require ntavelis/auth-email
```

Then add the service provider in `config/app.php`:

Note: Starting with Laravel 5.5 this package gets auto discovered so you can skip this step!

```
'providers' => [
    Ntavelis\AuthEmail\AuthEmailServiceProvider::class,
];
```

Run your new command:

```
$ php artisan auth:email
```

Finally run your migrations. Now you have email Authentication. Visit `/register` to register a new user via email.

Note: Make sure you configured your email settings properly.

Options/Parameters
------------------

[](#optionsparameters)

Auth-email provides the following options:

If you have already bootstrapped your application with `make:auth` before you discovered this package, then you can pass the `-o`, `--only` flag, to make auth-email skip running `make:auth` command.

```
$ php artisan auth:email -o
```

Auth-email can run your migrations after setup, to keep installation process as minimum as possible. Pass it the `-m`, `--migrate` flag.

```
$ php artisan auth:email -m
```

Note: Make sure you configured your database settings properly before running the command.

Auth-email can make your generated `app/mail/ActivateAccount.php` implement the ShouldQueue interface. Pass it the `-s`, `--queue` flag.

```
$ php artisan auth:email -s
```

Note: Make sure you configured your queue driver properly.

You can also run the command with any number of flags.

```
$ php artisan auth:email -o -m -s
```

Migrations
----------

[](#migrations)

After the initial installation, you need to run your migrations, auth-email added 2 migration files on your `database/migrations/` path. Which provide 1 new table to store activation tokens and 1 new column in the user table, create\_users\_table migration is provided by default in laravel, we just add 1 column with the new migration to track the authenticated(Via email) users.

Alternatively as mentioned above pass it the `-m` flag to instantly run the migrations for you after setup.

```
$ php artisan auth:email -m
```

Email markup
------------

[](#email-markup)

To change the look of the activation email you send to the user, you have to modify the `resources/views/emails/auth.blade.php` blade file.

This file uses Laravel's 5.4 new feature markdown mailables, please refer to the Laravel documentation for details.

The mailable that is responsible for the markup (subject,sender etc) of the activation mail, is located in the `app/Mail/ActivateAccount.php`.

Flash messages
--------------

[](#flash-messages)

Auth-email provides 2 flash messages out of the box.

The `authEmail.mailSend` message informs the user after registration to check their inbox and activate their account.

The `authEmail.confirm` message informs the user, who just tried to login without being authenticated, that they have to click the activate button on the email we sent them.

If you need to change these messages, you can do so from this file `resources/lang/en/authEmail.php`.

Queue
-----

[](#queue)

The default behavior is not to implement the ShouldQueue interface, for simplicity on setup. But I strongly encourage you to use queues.

If you want your email to implement ShouldQueue interface, therefore to be queueable. You can pass it the `-s`, `--queue` flag. Then your generated email in the `app/mail/ActivateAccount.php` would implement the ShouldQueue interface.

Alternatively you can manually make it implement ShouldQueue interface.

You can read more about queues on Laravel's documentation .

Validation
----------

[](#validation)

This package adds one more validation rule called `alpha_spaces`. It considers valid alphanumeric characters and spaces, and is used to validate the `name`, on the registration form.

You can find the displayed message in, `resources/lang/en/validation.php`, and if you are interested the validation logic is located in this package's ServiceProvider on the register method.

Generated Files
---------------

[](#generated-files)

List of all the generated files from the `auth:email` command:

FileLocationFunctionalityLoginController.php/app/Http/Controllers/Auth/Adds authenticated methodRegisterController.php/app/Http/Controllers/Auth/Adds 4 new methods for email authenticationlogin.blade.php/resources/views/auth/Adds flash message logic, to display alertsauth.blade.php/resources/views/emails/Activation email, with activation linkY\_m\_d\_His\_create\_user\_activations\_table.php/database/migrations/Migration that creates table user\_activationsY\_m\_d\_His\_add\_boolean\_column\_to\_users\_table.php/database/migrations/Adds column activated to users tableauthEmail.php/resources/lang/en/The messages text exists in this fileActivateAccount.php/app/Mail/Mailable, sends the activation mail.Also one more line is appended into your routes file `web.php`, which creates the activation route of your application. The activation route looks like this `/user/activation/{token}`.

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

[](#requirements)

Requires PHP &gt;= 5.6.\*

Laravel Framework to be installed, with version &gt;= 5.4

Supported Laravel versions
--------------------------

[](#supported-laravel-versions)

This package supports all Laravel versions from 5.4 onwards.

- From version 1.4.0, support has been added for Laravel 5.6

Change log
----------

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Athanasios Ntavelis](https://github.com/ntavelis)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% 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 ~20 days

Recently: every ~47 days

Total

19

Last Release

3055d ago

PHP version history (5 changes)v1.0.0PHP ~5.6|~7.0

V1.2.2PHP ~7.0

v1.2.4PHP ~5.6

v1.2.5PHP ^5.6

v1.2.6PHP &gt;=5.6.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d83db5a7ccec375ab43167863c5d776f8ba00ae34dfacc6ef283032d9c5828f?d=identicon)[Ntavelis](/maintainers/Ntavelis)

---

Top Contributors

[![ntavelis](https://avatars.githubusercontent.com/u/20874606?v=4)](https://github.com/ntavelis "ntavelis (115 commits)")[![jodenis](https://avatars.githubusercontent.com/u/1812913?v=4)](https://github.com/jodenis "jodenis (1 commits)")

---

Tags

artisanauthenticationcliemaillaravellaravel-5-packagelaravelAuthEmail

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ntavelis-auth-email/health.svg)

```
[![Health](https://phpackages.com/badges/ntavelis-auth-email/health.svg)](https://phpackages.com/packages/ntavelis-auth-email)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.6k](/packages/larastan-larastan)[laravel/ai

The official AI SDK for Laravel.

9782.1M161](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k239.9k75](/packages/moonshine-moonshine)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76518.2M119](/packages/laravel-mcp)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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