Skip to content

Commit e3c144c

Browse files
committed
Merge branch 'main' into repalce_register_with_fortify
# Conflicts: # app/Http/Controllers/Auth/NewPasswordController.php # app/Http/Controllers/Auth/RegisteredUserController.php
2 parents b931cb3 + 854c5d6 commit e3c144c

File tree

5 files changed

+1751
-330
lines changed

5 files changed

+1751
-330
lines changed

app/Http/Controllers/Settings/PasswordController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use App\Http\Controllers\Controller;
66
use Illuminate\Http\RedirectResponse;
77
use Illuminate\Http\Request;
8-
use Illuminate\Support\Facades\Hash;
98
use Illuminate\Validation\Rules\Password;
109
use Inertia\Inertia;
1110
use Inertia\Response;
@@ -31,7 +30,7 @@ public function update(Request $request): RedirectResponse
3130
]);
3231

3332
$request->user()->update([
34-
'password' => Hash::make($validated['password']),
33+
'password' => $validated['password'],
3534
]);
3635

3736
return back();

app/Models/User.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class User extends Authenticatable
3232
protected $hidden = [
3333
'password',
3434
'two_factor_secret',
35-
'two_factory_recovery_codes',
35+
'two_factor_recovery_codes',
3636
'remember_token',
3737
];
3838

@@ -46,6 +46,7 @@ protected function casts(): array
4646
return [
4747
'email_verified_at' => 'datetime',
4848
'password' => 'hashed',
49+
'two_factor_confirmed_at' => 'datetime',
4950
];
5051
}
5152
}

database/factories/UserFactory.php

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

55
use Illuminate\Database\Eloquent\Factories\Factory;
6-
use Illuminate\Support\Facades\Hash;
76
use Illuminate\Support\Str;
87

98
/**
@@ -27,7 +26,7 @@ public function definition(): array
2726
'name' => fake()->name(),
2827
'email' => fake()->unique()->safeEmail(),
2928
'email_verified_at' => now(),
30-
'password' => static::$password ??= Hash::make('password'),
29+
'password' => static::$password ??= 'password',
3130
'remember_token' => Str::random(10),
3231
'two_factor_secret' => Str::random(10),
3332
'two_factor_recovery_codes' => Str::random(10),

0 commit comments

Comments
 (0)