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
* Add common issues to read.me
The issue that a POST is not working, seems to
came up very offten in the issue section.
Therefore this commit integrates that into the
readme.md
I also replaced `getLocalizedURL` with `localizeURL`
because its shorter, and I think most people
just want to pass the `url` anyway.
* Added not obvious duplicates of post-issue
* grammatically adjustments
It returns a URL localized to the desired locale (if no locale is given, it uses current locale).
276
281
277
-
##### Route Model Binding
282
+
283
+
#### Route Model Binding
278
284
279
285
Note that [route model binding]([https://laravel.com/docs/master/routing#route-model-binding]) is taken into account when generating the localized route.
280
286
@@ -293,7 +299,7 @@ Note that [route model binding]([https://laravel.com/docs/master/routing#route-m
It returns a route, localized to the desired locale using the locale passed. If the translation key does not exist in the locale given, this function will return false.
@@ -567,10 +573,50 @@ More information on support on [cached (translated) routes here](CACHING.md).
567
573
568
574
Note that the separate [czim/laravel-localization-route-cache](https://github.com/czim/laravel-localization-route-cache) package is no longer required.
569
575
576
+
## Common Issues
577
+
578
+
### POST is not working
579
+
580
+
This may happen if you do not localize your action route that is inside your `Routes::group`.
581
+
This may cause a redirect, which then changes the post request into a get request.
582
+
To prevent that, simply use the [localize helper](#get-localized-url).
583
+
584
+
For example, if you use `Auth::routes()` and put them into your `Route::group` Then
0 commit comments