Alice Johnson

ID 1
Email alice@example.com
Role User

🔍 How This Page Was Routed

URL Requested /users/1
Route Pattern /users/(\d+)
Regex Used #^/users/(\d+)$#
Captured Parameter $id = '1'
Controller Called UserController::show('1')

The (\d+) pattern:

  • \d matches any digit (0-9)
  • + means "one or more"
  • Parentheses () create a "capture group"
  • The captured value becomes a parameter to your method