alexisgeneau / mailvalidate
将邮件验证器添加到Laravel应用中
dev-master
2022-10-26 12:40 UTC
This package is not auto-updated.
Last update: 2024-09-18 17:32:39 UTC
README
安装
将MailValidate添加到您的composer.json文件中,以要求MailValidate
require : {
"alexisgeneau/mailvalidate": "dev-master"
}
更新Composer
composer update
下一步是将服务提供程序添加到config/app.php中
Alexisgeneau\MailValidate\MailValidateServiceProvider::class,
发布
下一步是使用以下命令发布您应用中的文件
php artisan vendor:publish --force
警告!此命令将替换您应用中的'AuthController'以编辑PostLogin函数。
迁移
运行迁移命令以在数据库中的用户上添加列
php artisan migrate
在用户模型中添加'confirmation_token'和'confirmed'到$fillable。
路由
要添加邮件验证,请在routes.php中添加以下行
Route::get('register/verify/{confirmationToken}', [
'as' => 'confirmation_path',
'uses' => 'RegistrationController@confirm'
]);