Skip to content

Commit 725d33e

Browse files
Support mixed input
1 parent 92b655a commit 725d33e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BooleanDateAttribute.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ public static function for(string $column): static
1313
{
1414
return parent::make(
1515
get: static fn (?string $value, array $attributes): bool => $attributes[$column] !== null,
16-
set: static fn (bool $value, array $attributes): array => static::setBooleanDate($value, $attributes, $column),
16+
set: static fn (mixed $value, array $attributes): array => static::setBooleanDate($value, $attributes, $column),
1717
);
1818
}
1919

20-
private static function setBooleanDate(bool $value, array $attributes, string $column): array
20+
private static function setBooleanDate(mixed $value, array $attributes, string $column): array
2121
{
2222
// Only update the field if it's never been set before or when it's being "disabled"
2323

0 commit comments

Comments
 (0)