Forgot and Reset controller changed request methods
This commit is contained in:
@ -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);
|
||||
|
@ -4,7 +4,7 @@ namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Abstracts\Http\Controller;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Requests\Auth\Reset as Request;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
@ -36,10 +36,15 @@ class Reset extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reset link to the given user.
|
||||
*
|
||||
* @param \App\Http\Requests\Auth\Reset $request
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$this->validate($request, $this->rules(), $this->validationErrorMessages());
|
||||
|
||||
// Here we will attempt to reset the user's password. If it is successful we
|
||||
// will update the password on an actual user model and persist it to the
|
||||
// database. Otherwise we will parse the error and return the response.
|
||||
|
Reference in New Issue
Block a user