Skip to content

Commit

Permalink
feat: try to add comparability with laravel 10
Browse files Browse the repository at this point in the history
  • Loading branch information
beliven-fabrizio-gortani committed Dec 12, 2024
1 parent e803e71 commit d65d177
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Traits/HasPasswordHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ trait HasPasswordHistory

private static ?string $plain_text_password = null;

protected function casts(): array
protected function traitCasts(): array
{
return [
...parent::casts(),
$this->password_field_column => 'hashed',
];
}

public function getCasts(): array
{
return array_merge(parent::getCasts(), $this->traitCasts());
}

protected static function bootHasPasswordHistory(): void
{
static::created(function ($model) {
Expand Down

0 comments on commit d65d177

Please sign in to comment.