Skip to content

Commit

Permalink
Merge pull request #15 from SuryaWebfox/use_values
Browse files Browse the repository at this point in the history
MOD use value in map method
  • Loading branch information
SuryaWebfox authored Aug 28, 2023
2 parents d32c4b4 + 329f890 commit 6148068
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to `laravel-backed-enums` will be documented in this file.

## v2.0.0 - 2023-08-28

### What's Changed

- Use value in `map()` method

## v1.2.3 - 2023-03-02

### What's Changed
Expand Down
2 changes: 1 addition & 1 deletion src/IsBackedEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static function map(): array
$array = [];

foreach (self::cases() as $enum) {
$array[$enum->name] = $enum->label();
$array[$enum->value] = $enum->label();
}

return $array;
Expand Down

0 comments on commit 6148068

Please sign in to comment.