Skip to content

Commit 94b1d93

Browse files
authored
Update IsBackedEnum.php
Fixed bug where if no label in enums.php value was not being returned from labelFor
1 parent 2c73c39 commit 94b1d93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IsBackedEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function labelFor(self $value): string
6161
$value->value
6262
);
6363

64-
return app('translator')->has($lang_key) ? __($lang_key) : $value;
64+
return app('translator')->has($lang_key) ? __($lang_key) : $value->value;
6565
}
6666

6767
public function label(): string

0 commit comments

Comments
 (0)