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