2017-03-06 12 views
0

プロダクションサーバー上で404エラーが見つかりませんでしたが、ローカルで動作するルートは誰でも知っていますか?Laravel 5 - プロダクションサーバーのパスワードをリセットできません。404 - 見つかりません。

電子メールでパスワードをリセットしようとすると(https://compariimobiliare.ro/password/reset)、POST URL https://compariimobiliare.ro/password/emailは404 Not Foundエラーを返します。同じURLは、ローカルサーバーで正常に動作しますが、運用環境では正常に動作しません。

ルートは、私はコマンドを実行したとき、私はそれを見ることができ、そこにある:

php artisan route:list 

POST | password/email | | App\Http\Controllers\Auth\[email protected] | web,guest 

enter image description here

Laravelのデフォルトの実装:

public function sendResetLinkEmail(Request $request) 
{ 
     $this->validate($request, ['email' => 'required|email']); 

     // We will send the password reset link to this user. Once we have attempted 
     // to send the link, we will examine the response then see the message we 
     // need to show to the user. Finally, we'll send out a proper response. 
     $response = $this->broker()->sendResetLink(
      $request->only('email') 
     ); 

     if ($response === Password::RESET_LINK_SENT) { 
      return back()->with('status', trans($response)); 
     } 

     // If an error was returned by the password broker, we will get this message 
     // translated so we can notify a user of the problem. We'll redirect back 
     // to where the users came from so they can attempt this process again. 
     return back()->withErrors(
      ['email' => trans($response)] 
     ); 
    } 
+0

コントローラ 'ForgotPasswordController'に' sendResetLinkEmail'メソッドのコードを表示できますか? – KuKeC

答えて

1

私はあなたのためにPOSTルートを持って見ることができますパスワード/電子メール。 パスワード/メールのGETルートもありますか? GETルートにアクセスしようとしているため、404が表示されています。

+0

これは奇妙な部分ですが、フォームはPOSTアクションを使用しますが、404エラーが発生しました.GETエラーが発生しました...奇妙なリダイレクト... Postmanを使用して「https://compariimobiliare.ro/password/email」にアクセスしようとしましたが、 POSTリクエストで、同じ404エラーが見つかりません。 –

+0

ControllerでPOSTリクエストをどのように処理していますか?成功フォームのサブミットでユーザーをリダイレクトしますか? App \ Http \ Controllers \ Auth \ ForgotPasswordController @ sendResetLinkEmailにコードを共有できますか? –

+0

カスタムは何もありません。デフォルトのlaravel実装を使用しています。 –

関連する問題