2017-01-30 20:40:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Auth;
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2015-03-23 05:20:33 +01:00
|
|
|
use App\Http\Controllers\Controller;
|
2015-03-16 22:45:25 +01:00
|
|
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
class PasswordController 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.
|
|
|
|
|
|
|
|
|
*/
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
use ResetsPasswords;
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
2015-03-30 17:20:53 +02:00
|
|
|
protected $redirectTo = '/dashboard';
|
2016-07-03 18:11:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new password controller instance.
|
|
|
|
*
|
|
|
|
* @internal param \Illuminate\Contracts\Auth\Guard $auth
|
|
|
|
* @internal param \Illuminate\Contracts\Auth\PasswordBroker $passwords
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->middleware('guest');
|
|
|
|
}
|
2017-09-07 20:51:40 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Display the form to request a password reset link.
|
|
|
|
*
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function getEmailWrapper()
|
|
|
|
{
|
|
|
|
if (auth()->check()) {
|
|
|
|
return redirect('/');
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->getEmail();
|
|
|
|
}
|
2015-03-16 22:45:25 +01:00
|
|
|
}
|