Skip to content

Commit 6148068

Browse files
authored
Merge pull request #15 from SuryaWebfox/use_values
MOD use value in map method
2 parents d32c4b4 + 329f890 commit 6148068

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

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

5+
## v2.0.0 - 2023-08-28
6+
7+
### What's Changed
8+
9+
- Use value in `map()` method
10+
511
## v1.2.3 - 2023-03-02
612

713
### What's Changed

src/IsBackedEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function map(): array
3939
$array = [];
4040

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

4545
return $array;

0 commit comments

Comments
 (0)