【问题标题】:Change of url address after clicking on the activation link in the email单击电子邮件中的激活链接后更改 url 地址
【发布时间】:2019-07-28 08:00:31
【问题描述】:

我是 Laravel 的初学者。我在 Laravel 5.8 中制作我的项目。 我想更改激活电子邮件中发送的网址(注册新用户帐户后):

http://domain.test/email/verify/4? Expires = 1564173078 & signature = 60f6d062f9e52fcc79ffddaa5d82e46cf7fe9b748018ea9ff05bc6b4bf310f9b

到以下:

http://domain.test/activation/4? expires = 1564173078 & signature = 60f6d062f9e52fcc79ffddaa5d82e46cf7fe9b748018ea9ff05bc6b4bf310f9b

我该怎么做?

【问题讨论】:

  • 你的意思是从 /email/verify/ 到 /activation/ ?
  • 是的。我想将原始网址更改为我的
  • 对您有帮助吗?如果是,请将其标记为已接受

标签: php laravel laravel-5


【解决方案1】:

首先你需要注销验证路由

Auth::routes(['verify' => false]);

然后注册此路由。根据需要更改路径

Route::get('email/verify', 'Auth\VerificationController@show')->name('verification.notice');
Route::get('email/verify/{id}', 'Auth\VerificationController@verify')->name('verification.verify');
Route::get('email/resend', 'Auth\VerificationController@resend')->name('verification.resend');

您可以通过发出此工匠命令来比较之前和之后的路线

php artisan route:list

【讨论】:

    猜你喜欢
    • 2019-07-08
    • 2017-08-25
    • 2015-09-16
    • 2017-09-24
    • 2011-05-20
    • 1970-01-01
    • 2016-11-30
    • 2011-05-19
    • 2016-08-28
    相关资源
    最近更新 更多