Skip to content

Commit 24277d9

Browse files
committed
Revert Hash Changes
1 parent 736a83c commit 24277d9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/Http/Controllers/Settings/PasswordController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use App\Http\Controllers\Controller;
66
use Illuminate\Http\RedirectResponse;
77
use Illuminate\Http\Request;
8+
use Illuminate\Support\Facades\Hash;
89
use Illuminate\Validation\Rules\Password;
910
use Inertia\Inertia;
1011
use Inertia\Response;
@@ -30,7 +31,7 @@ public function update(Request $request): RedirectResponse
3031
]);
3132

3233
$request->user()->update([
33-
'password' => $validated['password'],
34+
'password' => Hash::make($validated['password']),
3435
]);
3536

3637
return back();

database/factories/UserFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Database\Factories;
44

55
use Illuminate\Database\Eloquent\Factories\Factory;
6+
use Illuminate\Support\Facades\Hash;
67
use Illuminate\Support\Str;
78

89
/**
@@ -26,7 +27,7 @@ public function definition(): array
2627
'name' => fake()->name(),
2728
'email' => fake()->unique()->safeEmail(),
2829
'email_verified_at' => now(),
29-
'password' => static::$password ??= 'password',
30+
'password' => static::$password ??= Hash::make('password'),
3031
'remember_token' => Str::random(10),
3132
'two_factor_secret' => Str::random(10),
3233
'two_factor_recovery_codes' => Str::random(10),

0 commit comments

Comments
 (0)