]> BookStack Code Mirror - bookstack/blob - app/Http/Controllers/Auth/ResetPasswordController.php
Merge branch 'feature/public-login-redirect' of git://github.com/Xiphoseer/BookStack...
[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 use Illuminate\Http\Request;
8
9 class ResetPasswordController extends Controller
10 {
11     /*
12     |--------------------------------------------------------------------------
13     | Password Reset Controller
14     |--------------------------------------------------------------------------
15     |
16     | This controller is responsible for handling password reset requests
17     | and uses a simple trait to include this behavior. You're free to
18     | explore this trait and override any methods you wish to tweak.
19     |
20     */
21
22     use ResetsPasswords;
23
24     protected $redirectTo = '/';
25
26     /**
27      * Create a new controller instance.
28      *
29      * @return void
30      */
31     public function __construct()
32     {
33         $this->middleware('guest');
34         $this->middleware('guard:standard');
35         parent::__construct();
36     }
37
38     /**
39      * Get the response for a successful password reset.
40      *
41      * @param Request $request
42      * @param string $response
43      * @return \Illuminate\Http\Response
44      */
45     protected function sendResetResponse(Request $request, $response)
46     {
47         $message = trans('auth.reset_password_success');
48         $this->showSuccessNotification($message);
49         return redirect($this->redirectPath())
50             ->with('status', trans($response));
51     }
52 }