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-supply-default-values-for-route-parameters.md
2022-01-07 18:37:55 +01:00

13 lines
594 B
Markdown

---
title: 'You can supply default values for route parameters'
tweet_id: '1479467942039285762'
thread_slug: weekly-thread-2022-01
author_username: ryangjchandler
images:
- 'https://pbs.twimg.com/media/FIWa8DxXMAIW7Tz.jpg'
created_at: 2022-01-07T15:00:19+00:00
slug: you-can-supply-default-values-for-route-parameters
---
🔥 Did you know that you can supply default values for route parameters in @laravelphp?
In the screenshot below, we use the current user's account as the default value for `{account}`. This means we don't have to provide it when generating the `users.index` route.