1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace App\Http\Controllers\Auth; |
4
|
|
|
|
5
|
|
|
use App\Http\Controllers\Controller; |
6
|
|
|
use Illuminate\Foundation\Auth\ResetsPasswords; |
7
|
|
|
use Illuminate\Support\Str; |
8
|
|
|
use Illuminate\Http\Request; |
9
|
|
|
use Illuminate\Support\Facades\Auth; |
10
|
|
|
use Illuminate\Support\Facades\Hash; |
11
|
|
|
use Illuminate\Support\Facades\Password; |
12
|
|
|
use Illuminate\Auth\Events\PasswordReset; |
13
|
|
|
|
14
|
|
|
class ResetPasswordController extends Controller |
15
|
|
|
{ |
16
|
|
|
/* |
17
|
|
|
|-------------------------------------------------------------------------- |
18
|
|
|
| Password Reset Controller |
19
|
|
|
|-------------------------------------------------------------------------- |
20
|
|
|
| |
21
|
|
|
| This controller is responsible for handling password reset requests |
22
|
|
|
| and uses a simple trait to include this behavior. You're free to |
23
|
|
|
| explore this trait and override any methods you wish to tweak. |
24
|
|
|
| |
25
|
|
|
*/ |
26
|
|
|
|
27
|
|
|
use ResetsPasswords; |
|
|
|
|
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Where to redirect users after resetting their password. |
31
|
|
|
* |
32
|
|
|
* @var string |
33
|
|
|
*/ |
34
|
|
|
protected $redirectTo='/home'; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Create a new controller instance. |
38
|
|
|
* |
39
|
|
|
* @return void |
40
|
|
|
*/ |
41
|
|
|
public function __construct() |
42
|
|
|
{ |
43
|
|
|
$this->middleware('guest'); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Display the password reset view for the given token. |
48
|
|
|
* |
49
|
|
|
* If no token is present, display the link request form. |
50
|
|
|
* |
51
|
|
|
* @param \Illuminate\Http\Request $request |
52
|
|
|
* @param string|null $token |
53
|
|
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
54
|
|
|
*/ |
55
|
|
|
public function showResetForm(Request $request, $token = null) |
56
|
|
|
{ |
57
|
|
|
return view('auth.passwords.reset',[ |
58
|
|
|
'token' => $token, |
59
|
|
|
'email' => $request->email, |
60
|
|
|
'page_title'=>"Reset Password", |
61
|
|
|
'site_title'=>config("app.name"), |
62
|
|
|
'navigation' => "Account" |
63
|
|
|
]); |
64
|
|
|
} |
65
|
|
|
} |
66
|
|
|
|