Browse Source

Fix redirects.

Taylor Otwell 10 years ago
parent
commit
33efefa388
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Http/Controllers/PasswordController.php

+ 2 - 2
app/Http/Controllers/PasswordController.php

@@ -47,7 +47,7 @@ class PasswordController extends Controller {
 		switch ($response = $this->passwords->sendResetLink($request->only('email')))
 		{
 			case PasswordBroker::INVALID_USER:
-				return redirect()->back()->with('error', trans($response));
+				return redirect()->back()->withErrors(['email' =>trans($response)]);
 
 			case PasswordBroker::RESET_LINK_SENT:
 				return redirect()->back()->with('status', trans($response));
@@ -94,7 +94,7 @@ class PasswordController extends Controller {
 			case PasswordBroker::INVALID_PASSWORD:
 			case PasswordBroker::INVALID_TOKEN:
 			case PasswordBroker::INVALID_USER:
-				return redirect()->back()->with('error', trans($response));
+				return redirect()->back()->withErrors(['email' => trans($response)]);
 
 			case PasswordBroker::PASSWORD_RESET:
 				return redirect()->to('/');