Skip to content

Commit 52f6866

Browse files
authored
fix: no bcrypt() on password
A tiny tweak. The `User` password field is hashed and fillable by default. ``` > User::factory()->create(['name' => 'Foo Bar', 'email' => 'foobar@bar.com', 'password' => 'password']); = App\Models\User {#6235 name: "Foo Bar", email: "foobar@bar.com", email_verified_at: "2025-08-21 16:03:43", #password: "$2y$12$hrgAUJvdNYqs6AMetC/.c.X6AicAJIlQ7s/uGKdZAb6Bc.rySIsZ2", #remember_token: "tokK0VCbRy", updated_at: "2025-08-21 16:03:43", created_at: "2025-08-21 16:03:43", id: 1, } ```
1 parent c5be53b commit 52f6866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ it('may sign in the user', function () {
2525

2626
User::factory()->create([ // assumes RefreshDatabase trait is used on Pest.php...
2727
'email' => 'nuno@laravel.com',
28-
'password' => bcrypt('password'),
28+
'password' => 'password',
2929
]);
3030

3131
$page = visit('/')->on()->mobile()->firefox();

0 commit comments

Comments
 (0)