0
我有一个奇怪的问题,我无法解决。Laravel 5用户激活
当用户注册后,我将它们重定向到一个供稿网址,打开一个模式,并通过点击我发送给他们的电子邮件链接来通知我的用户激活他的帐户。但是当我点击链接后,我仍然被重定向到完全相同的页面(feed),并且我的账户没有被激活。这里可能是什么问题?
routes.php文件
Route::group(['namespace' => 'Auth'], function()
{
Route::group(['middleware' => 'auth'], function()
{
Route::get('activate/{token}', '[email protected]');
});
});
PasswordController
public function activate($token) {
//get token value.
// find the user that belongs to that token.
$activation = User::where("confirmation_code", $token)->get()->first();
$activation->confirmed = 1;
$activation->save();
}
RedirectIfAuthenticated.php如果我删除提要URL,它的工作原理。但我不想这样做。
public function handle($request, Closure $next)
{
if ($this->auth->check()) {
return redirect('/feed');
}
return $next($request);
}
你能发布所有的路由吗?例如,我现在甚至都没有看到路径文件中的'/ feed'。 – djt