Skip to content

[4.x] fix: bcrypt() not needed on password#318

Merged
nunomaduro merged 1 commit intopestphp:4.xfrom
ziadoz:patch-1
Aug 21, 2025
Merged

[4.x] fix: bcrypt() not needed on password#318
nunomaduro merged 1 commit intopestphp:4.xfrom
ziadoz:patch-1

Conversation

@ziadoz
Copy link
Copy Markdown
Contributor

@ziadoz ziadoz commented Aug 21, 2025

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,
  }

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,
  }
```
@ziadoz ziadoz changed the title fix: no bcrypt() on password fix: bcrypt() not needed on password Aug 21, 2025
@ziadoz ziadoz changed the title fix: bcrypt() not needed on password [4.x] fix: bcrypt() not needed on password Aug 21, 2025
@nunomaduro nunomaduro merged commit 2bb663d into pestphp:4.x Aug 21, 2025
@ziadoz ziadoz deleted the patch-1 branch August 21, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants