1
|
|
|
<?php namespace Arcanesoft\Auth\Http\Controllers\Front; |
2
|
|
|
|
3
|
|
|
use Illuminate\Foundation\Auth\ResetsPasswords; |
4
|
|
|
use Illuminate\Http\Request; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class ResetPasswordController |
8
|
|
|
* |
9
|
|
|
* @package Arcanesoft\Auth\Http\Controllers\Front |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
*/ |
12
|
|
|
class ResetPasswordController extends Controller |
13
|
|
|
{ |
14
|
|
|
/* ------------------------------------------------------------------------------------------------ |
15
|
|
|
| Traits |
16
|
|
|
| ------------------------------------------------------------------------------------------------ |
17
|
|
|
*/ |
18
|
|
|
use ResetsPasswords; |
19
|
|
|
|
20
|
|
|
/* ------------------------------------------------------------------------------------------------ |
21
|
|
|
| Constructor |
22
|
|
|
| ------------------------------------------------------------------------------------------------ |
23
|
|
|
*/ |
24
|
|
|
/** |
25
|
|
|
* Create a new controller instance. |
26
|
|
|
*/ |
27
|
|
|
public function __construct() |
28
|
|
|
{ |
29
|
|
|
$this->middleware('guest'); |
30
|
|
|
|
31
|
|
|
parent::__construct(); |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/* ------------------------------------------------------------------------------------------------ |
35
|
|
|
| Main Functions |
36
|
|
|
| ------------------------------------------------------------------------------------------------ |
37
|
|
|
*/ |
38
|
|
|
/** |
39
|
|
|
* Display the password reset view for the given token. |
40
|
|
|
* |
41
|
|
|
* If no token is present, display the link request form. |
42
|
|
|
* |
43
|
|
|
* @param \Illuminate\Http\Request $request |
44
|
|
|
* @param string|null $token |
45
|
|
|
* |
46
|
|
|
* @return \Illuminate\Contracts\View\Factory |
47
|
|
|
*/ |
48
|
|
|
public function showResetForm(Request $request, $token = null) |
49
|
|
|
{ |
50
|
|
|
return view('auth::public.passwords.reset')->with( |
51
|
|
|
['token' => $token, 'email' => $request->get('email')] |
52
|
|
|
); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/* ------------------------------------------------------------------------------------------------ |
56
|
|
|
| Other Functions |
57
|
|
|
| ------------------------------------------------------------------------------------------------ |
58
|
|
|
*/ |
59
|
|
|
/** |
60
|
|
|
* Get the post reset redirect path. |
61
|
|
|
* |
62
|
|
|
* @return string |
63
|
|
|
*/ |
64
|
|
|
public function redirectTo() |
65
|
|
|
{ |
66
|
|
|
return '/home'; |
67
|
|
|
} |
68
|
|
|
} |
69
|
|
|
|