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

50 lines
1.3 KiB
PHP
Raw Normal View History

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