]> BookStack Code Mirror - bookstack/blob - app/Http/Controllers/Auth/ResetPasswordController.php
Merge fixes from branch 'v0.12'
[bookstack] / app / Http / Controllers / Auth / ResetPasswordController.php
1 <?php
2
3 namespace BookStack\Http\Controllers\Auth;
4
5 use BookStack\Http\Controllers\Controller;
6 use Illuminate\Foundation\Auth\ResetsPasswords;
7
8 class ResetPasswordController extends Controller
9 {
10     /*
11     |--------------------------------------------------------------------------
12     | Password Reset Controller
13     |--------------------------------------------------------------------------
14     |
15     | This controller is responsible for handling password reset requests
16     | and uses a simple trait to include this behavior. You're free to
17     | explore this trait and override any methods you wish to tweak.
18     |
19     */
20
21     use ResetsPasswords;
22
23     protected $redirectTo = '/';
24
25     /**
26      * Create a new controller instance.
27      *
28      * @return void
29      */
30     public function __construct()
31     {
32         $this->middleware('guest');
33         parent::__construct();
34     }
35
36     /**
37      * Get the response for a successful password reset.
38      *
39      * @param  string  $response
40      * @return \Illuminate\Http\Response
41      */
42     protected function sendResetResponse($response)
43     {
44         $message = 'Your password has been successfully reset.';
45         session()->flash('success', $message);
46         return redirect($this->redirectPath())
47             ->with('status', trans($response));
48     }
49 }