diff --git a/app/Models/CV.php b/app/Models/CV.php index ad6b984..669472a 100644 --- a/app/Models/CV.php +++ b/app/Models/CV.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; -use Illuminate\Database\Eloquent\Relations\HasOne; /** * @property int $id @@ -33,7 +32,7 @@ class CV extends Model protected function phoneNumber(): Attribute { return Attribute::make( - get: fn (mixed $value): ?string => str_replace(' ', '', $value ?? ''), + get: fn (mixed $value, array $attributes): ?string => str_replace(' ', '', $attributes['phone_number'] ?? ''), ); } @@ -53,4 +52,4 @@ class CV extends Model { return 'token'; } -} +} \ No newline at end of file