PasswordResetCode
class PasswordResetCode extends BaseModel (View source)
Represents a password reset code associated with a user.
The code is hashed before saving and has an expiration date.
Properties
| bool | $incrementing | Indicates that the model does not use auto-incrementing IDs. |
from BaseModel |
| protected string | $keyType | The data type of the primary key ID. |
from BaseModel |
| bool | $timestamps | Indicates if the model should not use timestamps. |
|
| protected string | $table | The database table used by this model. |
|
| protected array<int,string> | $fillable | The attributes that are mass assignable. |
Methods
Converts the binary UUID stored in the database into a string UUID.
Hashes the value before saving it to the database.
Defines the relationship to the user who owns this reset code.
Details
string|null
getIdAttribute(mixed $value)
Converts the binary UUID stored in the database into a string UUID.
static protected void
boot()
Boot function for the model.
This ensures that every new record automatically gets a UUID assigned if no ID is provided during creation.
void
setValueAttribute(string $value)
Hashes the value before saving it to the database.
BelongsTo
user()
Defines the relationship to the user who owns this reset code.