Skip to content

Commit 8c03625

Browse files
committed
Add comment
1 parent 5ce0ce6 commit 8c03625

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Macros/LocalizedRoutesMacro.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ public static function register()
4343
App::setLocale($locale);
4444

4545
// Prepend the locale to the route name
46+
// and set a custom attribute so the middleware
47+
// can find it to set the correct app locale.
4648
$attributes = [
47-
'as'=>"{$locale}.",
48-
'localized-routes-locale'=>$locale
49+
'as' => "{$locale}.",
50+
'localized-routes-locale' => $locale
4951
];
5052

5153
// Add a custom domain route group

0 commit comments

Comments
 (0)