BookStack/app/Http/Controllers/Auth/ResetPasswordController.php

52 lines
1.4 KiB
PHP
Raw Normal View History

2015-07-13 03:01:42 +08:00
<?php
namespace BookStack\Http\Controllers\Auth;
2015-07-13 03:01:42 +08:00
use BookStack\Http\Controllers\Controller;
2015-07-13 03:01:42 +08:00
use Illuminate\Foundation\Auth\ResetsPasswords;
2019-09-07 06:36:16 +08:00
use Illuminate\Http\Request;
2015-07-13 03:01:42 +08:00
class ResetPasswordController extends Controller
2015-07-13 03:01:42 +08:00
{
/*
|--------------------------------------------------------------------------
| 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;
2016-11-12 19:40:54 +08:00
protected $redirectTo = '/';
2015-07-13 03:01:42 +08:00
/**
* Create a new controller instance.
*
* @return void
2015-07-13 03:01:42 +08:00
*/
public function __construct()
{
$this->middleware('guest');
parent::__construct();
2015-07-13 03:01:42 +08:00
}
2016-11-12 19:40:54 +08:00
/**
* Get the response for a successful password reset.
*
2019-09-07 06:36:16 +08:00
* @param Request $request
* @param string $response
2016-11-12 19:40:54 +08:00
* @return \Illuminate\Http\Response
*/
2019-09-07 06:36:16 +08:00
protected function sendResetResponse(Request $request, $response)
2016-11-12 19:40:54 +08:00
{
2016-12-05 00:51:39 +08:00
$message = trans('auth.reset_password_success');
$this->showSuccessNotification($message);
2016-11-12 19:40:54 +08:00
return redirect($this->redirectPath())
->with('status', trans($response));
}
}