1 | <?php |
||
9 | class ResetPasswordController extends Controller |
||
10 | { |
||
11 | protected $data = []; // the information we send to the view |
||
12 | |||
13 | /* |
||
14 | |-------------------------------------------------------------------------- |
||
15 | | Password Reset Controller |
||
16 | |-------------------------------------------------------------------------- |
||
17 | | |
||
18 | | This controller is responsible for handling password reset requests |
||
19 | | and uses a simple trait to include this behavior. You're free to |
||
20 | | explore this trait and override any methods you wish to tweak. |
||
21 | | |
||
22 | */ |
||
23 | |||
24 | use ResetsPasswords; |
||
25 | |||
26 | /** |
||
27 | * Create a new controller instance. |
||
28 | * |
||
29 | */ |
||
30 | public function __construct() |
||
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\Http\Response |
||
47 | */ |
||
48 | public function showResetForm(Request $request, $token = null) |
||
56 | } |
||
57 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: