Skip to content

Commit

Permalink
removes string backed enum type we also support int (#9574)
Browse files Browse the repository at this point in the history
  • Loading branch information
monurakkaya authored Apr 16, 2024
1 parent 40ceee0 commit 5c18f4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ Typically, a 404 HTTP response will be generated if an implicitly bound model is
<a name="implicit-enum-binding"></a>
### Implicit Enum Binding

PHP 8.1 introduced support for [Enums](https://www.php.net/manual/en/language.enumerations.backed.php). To complement this feature, Laravel allows you to type-hint a [string-backed Enum](https://www.php.net/manual/en/language.enumerations.backed.php) on your route definition and Laravel will only invoke the route if that route segment corresponds to a valid Enum value. Otherwise, a 404 HTTP response will be returned automatically. For example, given the following Enum:
PHP 8.1 introduced support for [Enums](https://www.php.net/manual/en/language.enumerations.backed.php). To complement this feature, Laravel allows you to type-hint a [backed Enum](https://www.php.net/manual/en/language.enumerations.backed.php) on your route definition and Laravel will only invoke the route if that route segment corresponds to a valid Enum value. Otherwise, a 404 HTTP response will be returned automatically. For example, given the following Enum:

```php
<?php
Expand Down

0 comments on commit 5c18f4c

Please sign in to comment.