Skip to content

Commit c9e436c

Browse files
committed
Use new Password::defaults() feature.
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent e2478cd commit c9e436c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Diff for: auth-backend/ResetsPasswords.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Illuminate\Support\Facades\Hash;
1010
use Illuminate\Support\Facades\Password;
1111
use Illuminate\Support\Str;
12+
use Illuminate\Validation\Rules;
1213
use Illuminate\Validation\ValidationException;
1314

1415
trait ResetsPasswords
@@ -26,7 +27,7 @@ trait ResetsPasswords
2627
public function showResetForm(Request $request)
2728
{
2829
$token = $request->route()->parameter('token');
29-
30+
3031
return view('auth.passwords.reset')->with(
3132
['token' => $token, 'email' => $request->email]
3233
);
@@ -69,7 +70,7 @@ protected function rules()
6970
return [
7071
'token' => 'required',
7172
'email' => 'required|email',
72-
'password' => 'required|confirmed|min:8',
73+
'password' => ['required', 'confirmed', Rules\Password::defaults()],
7374
];
7475
}
7576

Diff for: composer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
],
1212
"require": {
1313
"php": "^7.3|^8.0",
14-
"illuminate/console": "^8.0",
15-
"illuminate/filesystem": "^8.0",
16-
"illuminate/support": "^8.0"
14+
"illuminate/console": "^8.42",
15+
"illuminate/filesystem": "^8.42",
16+
"illuminate/support": "^8.42",
17+
"illuminate/validation": "^8.42"
1718
},
1819
"autoload": {
1920
"psr-4": {

0 commit comments

Comments
 (0)