Download the PHP package kaoken/laravel-email-reset without Composer
On this page you can find all versions of the php package kaoken/laravel-email-reset. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kaoken/laravel-email-reset
More information about kaoken/laravel-email-reset
Files in kaoken/laravel-email-reset
Package laravel-email-reset
Short Description Request to change the e-mail address of the Auth user, change it after moving to the specified URL of the confirmation e-mail.
License MIT
Homepage https://github.com/kaoken/laravel-email-reset
Informations about the package laravel-email-reset
laravel-email-reset
Request to change the e-mail address of the Auth user, change it after moving to the specified URL of the confirmation e-mail.
Table of content
- Install
- Setting
- Event
- License
Install
composer:
Setting
Add to config\app.php
as follows:
Example of adding to config\auth.php
add 'email_reset' => 'users',
.
model
is a user model classemail_confirmation
should modify the class derived fromMailable as necessary. Used to send confirmation mail.table
is the name of the table used for this service- If
expire
does not manipulate X hours after registration, the 1st change email is deleted.
Command
After execution, the following directories and files are added.
database
migrations
2017_09_21_000001_create_mail_reset_users_table.php
resources
lang
en
mail_reset.php
ja
mail_reset.php
views
vendor
confirmation
mail
confirmation.blade.php
complete.blade.blade.php
Migration
Migration file 2017_09_21_000001_create_mail_reset_users_table.php
should be modified as necessary.
Add to kernel
Add it to the schedule
method of app\Console\Kernel.php
.
This is used to delete users who passed 1 hour after 1st registration.
In the configuration config\auth.php
with the above setting,
Kaoken\LaravelMailReset\Mail\MailResetConfirmationToUser::class
of email_reset
is used as a confirmation email when changing mail.
The template is views\vendor\mail_reset\mail\confirmation.blade.php
Is used. Change according to the specifications of the application.
controller
Example of changing e-mail address
Be sure to write use MailResetUsers
and $broker
in the class.
Route
From the above controller!
Events
See inside the vendor\kaoken\laravel-email-reset\src\Events
directory!
ChangedMailAddressEvent
Called after the mail address has been completely changed.
MailResetConfirmationEvent
It is called after saving the change candidate of the mail address.