所以我有一個Laravel應用程序,但是我已經覆蓋了默認sendEmailVerificationNotification功能App\User.php。因為我不想要默認的電子郵件?,F(xiàn)在,當我注冊時,我會收到一封電子郵件和激活信息……一切正常。但是,當我單擊鏈接時,出現(xiàn)500錯誤...因此,我去查看日志并看到以下錯誤:Class 'App\Http\Controllers\Auth\Verified' not found現(xiàn)在,確實不存在該課程,因為我不知道在該課程中應該做什么...在我User.php的verify方法中,方法如下;public function verify(Request $request): Response{ if ($request->route('id') != $request->user()->getKey()) { throw new AuthorizationException; } if ($request->user()->hasVerifiedEmail()) { return redirect($this->redirectPath()); } if ($request->user()->markEmailAsVerified()) { event(new Verified($request->user())); toastr()->success('Uw email is geverifi?erd', 'Gelukt!', ['timeOut' => 5000]); } return redirect($this->redirectPath())->with('verified', true);}完整的錯誤是這樣的:[2019-04-14 11:57:29]登臺。錯誤:找不到類'App \ Http \ Controllers \ Auth \ Verified'{“ userId”:3,“ exception”:“ [對象](Symfony \ Component \ Debug \ Exception \ FatalThrowableError(代碼:0):在/var/www/rpr/releases/20190414113903/app/Http/Controllers/Auth/VerificationController.php:60上找不到類'App \ Http \ Controllers \ Auth \ Verified' )第60行VerficationController.php是}if語句的hasVerifiedEmail。有人可以解釋一下我如何才能驗證用戶并發(fā)出帳戶已驗證的通知嗎?
- 2 回答
- 0 關注
- 295 瀏覽
添加回答
舉報
0/150
提交
取消