Skip to content

Commit e380466

Browse files
authored
[11.x] restore string backed enum type (#10162)
1 parent 68072f2 commit e380466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ Typically, a 404 HTTP response will be generated if an implicitly bound model is
628628
<a name="implicit-enum-binding"></a>
629629
### Implicit Enum Binding
630630

631-
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:
631+
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:
632632

633633
```php
634634
<?php

0 commit comments

Comments
 (0)