2019-05-20 07:37:41 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Auth;
|
|
|
|
|
2020-01-15 11:48:22 +01:00
|
|
|
use Illuminate\Http\Request;
|
2019-05-20 07:37:41 +02:00
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
|
|
|
|
|
|
|
class ResetPasswordController extends Controller
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Password Reset Controller
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| This controller is responsible for handling password reset requests
|
|
|
|
| and uses a simple trait to include this behavior. You're free to
|
|
|
|
| explore this trait and override any methods you wish to tweak.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
use ResetsPasswords;
|
|
|
|
|
2020-01-14 23:50:07 +01:00
|
|
|
/**
|
|
|
|
* Get the response for a successful password reset.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Http\Request $request
|
|
|
|
* @param string $response
|
|
|
|
* @return \Illuminate\Http\RedirectResponse
|
|
|
|
*/
|
|
|
|
protected function sendResetResponse(Request $request, $response)
|
|
|
|
{
|
|
|
|
return ['status' => trans($response)];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the response for a failed password reset.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Http\Request $request
|
|
|
|
* @param string $response
|
|
|
|
* @return \Illuminate\Http\RedirectResponse
|
2020-03-05 16:41:55 +01:00
|
|
|
*
|
|
|
|
* @codeCoverageIgnore Can't find how to test this :/
|
2020-01-14 23:50:07 +01:00
|
|
|
*/
|
|
|
|
protected function sendResetFailedResponse(Request $request, $response)
|
|
|
|
{
|
2020-01-15 11:48:22 +01:00
|
|
|
return response()->json(['resetFailed' => trans($response)], 400);
|
2020-01-14 23:50:07 +01:00
|
|
|
}
|
2019-05-20 07:37:41 +02:00
|
|
|
}
|