Skip to content

Conversation

gdebrauwer
Copy link
Contributor

@gdebrauwer gdebrauwer commented May 3, 2023

The encrypted cast exists, but a cast that hashes a value does not exist yet. In a lot of applications (even Laravel's default application), the user model has a password. I think it makes sense to have a hashed cast that ensures the password (or some other attribute's value) is always hashed before being saved in the database.

Example:

public $casts = [
    'password' => 'hashed',
];

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