Forgot and Reset controller changed request methods

This commit is contained in:
Cüneyt Şentürk
2023-04-20 17:49:34 +03:00
parent 2534d28dca
commit 9b58482613
4 changed files with 73 additions and 8 deletions

View File

@ -5,7 +5,7 @@ namespace App\Http\Controllers\Auth;
use App\Abstracts\Http\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use Illuminate\Http\Request;
use App\Http\Requests\Auth\Forgot as Request;
use Illuminate\Support\Facades\Password;
class Forgot extends Controller
@ -42,13 +42,11 @@ class Forgot extends Controller
/**
* Send a reset link to the given user.
*
* @param \Illuminate\Http\Request $request
* @param \App\Http\Requests\Auth\Forgot $request
* @return \Illuminate\Http\RedirectResponse
*/
public function store(Request $request)
{
$this->validateEmail($request);
// 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.
@ -96,7 +94,7 @@ class Forgot extends Controller
'error' => true,
'message' => trans('passwords.user'),
'data' => null,
'redirect' => null,
'redirect' => route('forgot'),
];
return response()->json($response);