File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,19 @@ The above will generate:
518518- /en/materials/glass
519519- /nl/materials/glazen
520520
521- Note that in order to find a translated version of a route, you will need to give your routes a name.
521+ If you need to get a translation from a package,
522+ you can pass an optional translation namespace as a third parameter to ` Lang::uri() ` :
523+
524+ ``` php
525+ Route::localized(function () {
526+
527+ Route::get(Lang::uri('products/glass', null, 'shop'), ProductsController::class.'@index')
528+ ->name('products.glass');
529+
530+ });
531+ ```
532+
533+ > Note that in order to find a translated version of a route, you will need to give your routes a name.
522534 If you don't name your routes, only the parameters (model route keys) will be translated, not the "hard-coded" slugs.
523535
524536## 🚏 Route Parameters
You can’t perform that action at this time.
0 commit comments