PHPackages                             mp3063/mail-activation - 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. mp3063/mail-activation

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

mp3063/mail-activation
======================

Provides easy laravel auth with mail activation!

v5.5.1(9y ago)4881MITPHPPHP &gt;=5.5.9

Since Mar 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mp3063/laravel_mail_activation)[ Packagist](https://packagist.org/packages/mp3063/mail-activation)[ RSS](/packages/mp3063-mail-activation/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (1)Versions (10)Used By (0)

Easy Laravel 5.5 Auth with mail activation
------------------------------------------

[](#easy-laravel-55-auth-with-mail-activation)

##### For Laravel 5.4 use version 5.4.2

[](#for-laravel-54-use-version-542)

### Preparations

[](#preparations)

In .env file add your credentials, for example:

```
DB_HOST=localhost
DB_DATABASE=test_mail_activation
DB_USERNAME=root
DB_PASSWORD=
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=null
```

In config/mail.php add your mail and name:

```
'from' => ['address' => 'yourmail@123.com', 'name' => 'Your Name'],
```

In app/User.php file(MODEL) to $fillable array add two more columns to look like this:

```
protected $fillable = [ 'name', 'email', 'password', 'code', 'active' ];
```

These will install all necessary views into Resource folder. Run artisan command:

```
php artisan make:auth
```

Make shure to erase following line from routes/web.php or just comment it out because routes.php file from package will take place on all routes needed for auth. It's basically same file from Laravel ( changed 3 route to override Laravel methods ):

```
Auth::routes();
```

Your routes/web.php file should look like this:

```
