2017 © Pedro Peláez
 

library laravel-email-confirmation

Email address confirmation with Laravel

image

bestmomo/laravel-email-confirmation

Email address confirmation with Laravel

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 27 Forks
  • 5 Open issues
  • 9 Versions
  • 47 % Grown

The README.md

Laravel Email Confirmation

This package is to add email confirmation to Laravel 5.4 or 5.5 project., (*1)

It should be used after php artisan make:auth command but can also be added to existing project., (*2)

There is a french presentation of this package., (*3)

Features

  • create a migration to add confirmation columns to users table
  • create routes for confirmation confirmation/resend confirmation/{id}/{token}
  • add an artisan command to override login and register views
  • send email notification with registration
  • add translations for notification (there are french, english, arabic, swedish and spanish translation ones)
  • block login for not confirmed user and launch an alert with resend link for notification
  • block auto login on password reset for not confirmed user

Installation

Add package to your composer.json file :, (*4)

    composer require bestmomo/laravel-email-confirmation

For Laravel 5.4 add service provider to config/app.php (with Laravel 5.5 there is the package discovery):, (*5)

    Bestmomo\LaravelEmailConfirmation\ServiceProvider::class,

From V1.1.5 you must publish the migration with:, (*6)

    php artisan vendor:publish --provider="Bestmomo\LaravelEmailConfirmation\ServiceProvider" --tag="confirmation:migrations"

Run the published migration:, (*7)

    php artisan migrate

Change trait reference in LoginController :, (*8)

    use Bestmomo\LaravelEmailConfirmation\Traits\AuthenticatesUsers;

Change trait reference in RegisterController :, (*9)

    use Bestmomo\LaravelEmailConfirmation\Traits\RegistersUsers;

Change trait reference in ResetPasswordController:, (*10)

    use Bestmomo\LaravelEmailConfirmation\Traits\ResetsPasswords;

Publish

  • If you have used the php artisan make:auth command

Override login and register views to get confirmation alerts :, (*11)

    php artisan confirmation:auth
  • If you have custom scaffold

You must add alerts in login and register views. Here are 2 examples with Bootstrap., (*12)

Login view :, (*13)

@if (session('confirmation-success'))
    <div class="alert alert-success">
        {{ session('confirmation-success') }}
    </div>
@endif
@if (session('confirmation-danger'))
    <div class="alert alert-danger">
        {!! session('confirmation-danger') !!}
    </div>
@endif

Register view :, (*14)

@if (session('confirmation-success'))
    <div class="alert alert-success">
        {{ session('confirmation-success') }}
    </div>
@endif

Optional Publish

If you want to do some changes or add a language you can publish translations :, (*15)

    php artisan vendor:publish --tag=confirmation:translations

If you want to do some changes to confirmation notification you can make a copy in App :, (*16)

    php artisan confirmation:notification

The Versions

06/04 2018

dev-master

9999999-dev http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires

 

28/03 2018

V1.1.4

1.1.4.0 http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires

 

08/02 2018

V1.1.3

1.1.3.0 http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires

 

02/02 2018

V1.1.2

1.1.2.0 http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires

 

27/01 2018

V1.1.1

1.1.1.0 http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires

 

08/10 2017

V1.1.0

1.1.0.0 http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires

 

07/09 2017

V1.0.2

1.0.2.0 http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires

 

01/09 2017

V1.0.1

1.0.1.0 http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires

 

05/02 2017

V1.0.0

1.0.0.0 http://github.com/laravel-email-confirmation

Email address confirmation with Laravel

  Sources   Download

MIT

The Requires