Skip to content

Commit

Permalink
Fix fallbacks to actually work...
Browse files Browse the repository at this point in the history
  • Loading branch information
adevade committed Nov 25, 2024
1 parent af97cf2 commit 860be2c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/admin/src/Models/Staff.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ class Staff extends Authenticatable implements FilamentUser, HasName
'full_name',
];

protected function firstName(): Attribute
protected function firstname(): Attribute
{
return Attribute::make(
get: fn (): string => $this->first_name,
set: fn (?string $value) => $this->first_name = $value,
get: fn (mixed $value, array $attributes) => $attributes['first_name'],
set: fn (string $value) => ['first_name' => $value],
);
}

protected function lastName(): Attribute
protected function lastname(): Attribute
{
return Attribute::make(
get: fn (): string => $this->last_name,
set: fn (?string $value) => $this->last_name = $value,
get: fn (mixed $value, array $attributes) => $attributes['last_name'],
set: fn (string $value) => ['last_name' => $value],
);
}

Expand Down

0 comments on commit 860be2c

Please sign in to comment.