This package enables email confirmation for users in your Laravel app. This email confirmation package requires no changes to core laravel files or your user model.
Begin by pulling in the package through Composer.
composer require submtd/email-confirmationNext, if you are using Laravel 5.4, you will need to include the service providers in your config/app.php file. If you are using Laravel 5.5, these will be discovered automatically.
'providers' => [
Submtd\EmailConfirmation\Providers\EmailConfirmationServiceProvider::class,
Submtd\EmailConfirmation\Providers\EmailConfirmationListeners::class,
];Next, you will need to run the migrations in order to add the confirmed and confirmation_token columns to your users table.
php artisan migrateFinally, in order to see the status messages generated by this package, you will need to add the following code to your applications main blade template file.
@if(session('status'))
<div class="alert">
{{ session('status') }}
</div>
@endifIf you would like to edit the configuration, you must run the following artisan command to copy the config file and the views to your app directory.
php artisan vendor:publish --provider="Submtd\EmailConfirmation\Providers\EmailConfirmationServiceProvider"After running this command, the status messages can be found in config/email-confirmation.php and the email template can be found in resources/views/vendor/email-confirmation/ConfirmEmail.blade.php.
If you would like to only publish the config or the views or the migrations, use the --tag option on the artisan command.
php artisan vendor:publish --provider="Submtd\EmailConfirmation\Providers\EmailConfirmationServiceProvider" --tag=config
php artisan vendor:publish --provider="Submtd\EmailConfirmation\Providers\EmailConfirmationServiceProvider" --tag=migrations
php artisan vendor:publish --provider="Submtd\EmailConfirmation\Providers\EmailConfirmationServiceProvider" --tag=viewsIf this project helped you save some development time, feel free to buy me a beer ;)