Download the PHP package lactobasilus/email-verification without Composer
On this page you can find all versions of the php package lactobasilus/email-verification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lactobasilus/email-verification
More information about lactobasilus/email-verification
Files in lactobasilus/email-verification
Package email-verification
Short Description Add email verification to your Laravel projects.
License MIT
Homepage https://github.com/beyondcode/laravel-confirm-email
Informations about the package email-verification
Laravel Email Confirmation
Installation
You can install the package via composer:
Usage
This package adds a confirmed_at
and confirmation_code
field to your users table.
Publish the migration and the configuration file using
And run the migrations:
Configuring the login, register and forgot password controllers
In order to make use of the email verification, replace the AuthenticatesUsers
, RegistersUsers
and the SendsPasswordResetEmails
traits that
come with Laravel, with the ones provided by this package.
These traits can be found in these three files:
App\Http\Controllers\Auth\LoginController
App\Http\Controllers\Auth\RegisterController
App\Http\Controllers\Auth\ForgotPasswordController
Add the confirmation and resend routes
Add the following two routes to your routes/web.php
file:
Show confirmation messages
This packages adds some flash messages that contain error/information messages for your users.
To show them to your users, add this to your login.blade.php
:
and this to both your login.blade.php
and email.blade.php
Customization
This package comes with a language file, that allows you to modify the error / confirmation messages that your user
might see. In addition to that, you can change the notification class that will be used to send the confirmation code
completely, by changing it in the config/confirmation.php
file.
Change redirect routes
You can change all possible redirect routes by including these values either as properties in your registration controller, or as methods returning the route/URL string:
redirectConfirmationTo
redirectAfterRegistrationTo
redirectAfterResendConfirmationTo
They all default to route('login')
.
The Confirmed Event
On successful email confirmation, this package dispatches a Confirmed
event, in order for you to conveniently handle
any custom logic, such as sending a welcome email or automatically logging the user in.
Simply add the Confirmed
event, and your listeners, to the EventServiceProvider
in your application:
For more information about registering events and listeners, please refer to the Laravel docs.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Marcel Pociot
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of email-verification with dependencies
illuminate/auth Version ^7.0
illuminate/database Version ^7.0
illuminate/notifications Version ^7.0
illuminate/support Version ^7.0
laravel/ui Version ^2.0