1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/you-can-use-wherenumber-on-routes-instead-of-passing-a-regex-pattern-to-where.md
2022-02-21 16:15:07 +01:00

11 lines
No EOL
493 B
Markdown

---
title: 'You can use whereNumber() on routes instead of passing a regex pattern to where()'
tweet_id: '1495414943612506113'
thread_slug: weekly-thread-2022-07
author_username: Sileence
images:
- 'https://pbs.twimg.com/media/FLZ9iNEX0AcKQVD.jpg'
created_at: 2022-02-20T15:08:00+00:00
slug: you-can-use-wherenumber-on-routes-instead-of-passing-a-regex-pattern-to-where
---
I'm reading the Laravel 9 docs from scratch and TIL you can write your route restrictions in a more expressive way: