Skip to content

Commit 98800e0

Browse files
[11.x] Add whereIn example with enum class (#9649)
* Update routing.md * Update routing.md --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent b8bf6ca commit 98800e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ For convenience, some commonly used regular expression patterns have helper meth
323323
Route::get('/category/{category}', function (string $category) {
324324
// ...
325325
})->whereIn('category', ['movie', 'song', 'painting']);
326+
327+
Route::get('/category/{category}', function (string $category) {
328+
// ...
329+
})->whereIn('category', CategoryEnum::cases());
326330

327331
If the incoming request does not match the route pattern constraints, a 404 HTTP response will be returned.
328332

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy