You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: urls.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,3 +171,19 @@ It is cumbersome to always pass the `locale` every time you call the `route` hel
171
171
}
172
172
173
173
Once the default value for the `locale` parameter has been set, you are no longer required to pass its value when generating URLs via the `route` helper.
174
+
175
+
One thing to note with setting url defaults is that these can conflict with the implicit model bindings. To solve this, you need to [prioritize your middleware](https://laravel.com/docs/{{version}}/middleware#sorting-middleware) before the `SubstituteBindings` middleware that ships with Laravel:
176
+
177
+
/**
178
+
* The priority-sorted list of middleware.
179
+
*
180
+
* This forces non-global middleware to always be in the given order.
0 commit comments