2017-25 © Pedro Peláez
 

library laravel-email-verification

This Laravel package provides a simple solution for email verification.

image

aliabdulaziz/laravel-email-verification

This Laravel package provides a simple solution for email verification.

  • Tuesday, May 15, 2018
  • by Aliabdulaziz
  • Repository
  • 0 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

laravel-email-verification

This Laravel package provides a simple solution for email verification., (*1)

Requirements

  • Laravel 5.3+

Screenshots

Email is not verified, (*2)

Verification Mail, (*3)

Verification failed, (*4)

Email is verified, (*5)

Installation

It is recommended to install this package in a fresh installation of Laravel., (*6)

Laravel's built-in Auth System

This package is integrated with Laravel's built-in Auth System, so you must first run this command if you have not run it yet:, (*7)

php artisan make:auth

Now go to your (env) file and make sure that you have selected your database., (*8)

Install the package using composer

Now install the package using composer by running the following command:, (*9)

composer require aliabdulaziz/laravel-email-verification

Add the service provider (for Laravel < 5.5)

Go to: (Your Laravel App) --> config --> app.php, (*10)

and add the following line under 'Package Service Providers' comment:, (*11)

Aliabdulaziz\LaravelExtendedUser\LaravelEmailVerificationServiceProvider::class

Publish the config file

Run the following command to publish the package config file:, (*12)

php artisan vendor:publish --provider="Aliabdulaziz\LaravelEmailVerification\LaravelEmailVerificationServiceProvider" --tag=config

The config file is named (laravelemailverification.php) and will be located in the 'config' folder., (*13)

Migrate

Run the artisan migrate command to create the users table:, (*14)

this command will also migrate the package migration file by which the email_verification field is added to the users table., (*15)

php artisan migrate

Config Mail Driver

go to your (env) file and make sure that you have configured your mail driver., (*16)

Middleware

Go to: (Your Laravel App) --> app --> Http --> Kernal.php, (*17)

and add the following middleware to the $routeMiddleware array:, (*18)

'verifyEmail' => \Aliabdulaziz\LaravelEmailVerification\Middleware\VerifyEmail::class,

Now you can use this middleware on the routes that you want to prevent from being accessed by the users who did not verify their emails., (*19)

Example

Route::middleware(['web', 'auth', 'verifyEmail'])->group(function () {

    // Only users with verified emails can access this route
    Route::get('verified-email', function () {
        echo "Your email is verified!";
    });

});

Customization

To customize the package default views publish them to your views folder by running the following command:, (*20)

php artisan vendor:publish --provider="Aliabdulaziz\LaravelEmailVerification\LaravelEmailVerificationServiceProvider" --tag=views

Now make whatever customization you want on the published views., (*21)

The Versions

15/05 2018

dev-master

9999999-dev

This Laravel package provides a simple solution for email verification.

  Sources   Download

MIT

by Ali Abdulaziz

15/05 2018

v1.0.3

1.0.3.0

This Laravel package provides a simple solution for email verification.

  Sources   Download

MIT

by Ali Abdulaziz

15/05 2018

v1.0.2

1.0.2.0

This Laravel package provides a simple solution for email verification.

  Sources   Download

MIT

by Ali Abdulaziz

14/05 2018

v1.0.1

1.0.1.0

This Laravel package provides a simple solution for email verification.

  Sources   Download

MIT

by Ali Abdulaziz