@@ -34,7 +34,7 @@ public function createRoutes()
34
34
protected function utilCheck ()
35
35
{
36
36
if (!File::exists ($ this ->listFileDir )) {
37
- $ this ->localeCodes = array_keys (LaravelLocalization::getSupportedLocales ());
37
+ $ this ->localeCodes = array_keys (LaravelLocalization::getSupportedLocales ());
38
38
$ this ->listFileFound = false ;
39
39
40
40
$ this ->utilLoop ();
@@ -60,20 +60,20 @@ protected function utilLoop()
60
60
protected function pageComp ($ page )
61
61
{
62
62
// page data
63
- $ title = $ page ->title ;
64
- $ body = $ page ->body ;
65
- $ desc = $ page ->desc ;
66
- $ template = $ page ->template ;
63
+ $ title = $ page ->title ;
64
+ $ body = $ page ->body ;
65
+ $ desc = $ page ->desc ;
66
+ $ template = $ page ->template ;
67
67
$ breadCrump = $ page ->getAncestors ();
68
68
69
69
// route data
70
- $ url = $ page ->getTranslationWithoutFallback ('url ' , app ()->getLocale ());
71
- $ action = $ page ->action ;
72
- $ prefix = $ page ->getTranslationWithoutFallback ('prefix ' , app ()->getLocale ());
70
+ $ url = $ page ->getTranslationWithoutFallback ('url ' , app ()->getLocale ());
71
+ $ action = $ page ->action ;
72
+ $ prefix = $ page ->getTranslationWithoutFallback ('prefix ' , app ()->getLocale ());
73
73
$ routeName = $ page ->route_name ;
74
74
75
75
// middlewares
76
- $ roles = 'role: ' .implode (', ' , $ page ->roles ()->pluck ('name ' )->toArray ());
76
+ $ roles = 'role: ' .implode (', ' , $ page ->roles ()->pluck ('name ' )->toArray ());
77
77
$ permissions = 'perm: ' .implode (', ' , $ page ->permissions ()->pluck ('name ' )->toArray ());
78
78
79
79
// make route
@@ -92,7 +92,7 @@ protected function routeGen($routeName, $url, $prefix, $action, $roles, $permiss
92
92
}
93
93
94
94
// cache the page so we pass the page params to the controller@method
95
- Cache::rememberForever ($ routeName , function () use ($ template , $ title , $ body , $ desc , $ breadCrump ) {
95
+ Cache::rememberForever (LaravelLocalization:: getCurrentLocale (). ' - ' . $ routeName , function () use ($ template , $ title , $ body , $ desc , $ breadCrump ) {
96
96
return compact ('template ' , 'title ' , 'body ' , 'desc ' , 'breadCrump ' );
97
97
});
98
98
@@ -117,7 +117,7 @@ protected function routeGen($routeName, $url, $prefix, $action, $roles, $permiss
117
117
protected function createRoutesList ($ action , $ page , $ routeName )
118
118
{
119
119
foreach ($ this ->localeCodes as $ code ) {
120
- $ url = $ page ->getTranslationWithoutFallback ('url ' , $ code );
120
+ $ url = $ page ->getTranslationWithoutFallback ('url ' , $ code );
121
121
$ prefix = $ page ->getTranslationWithoutFallback ('prefix ' , $ code );
122
122
123
123
if ($ this ->escapeEmptyRoute ($ url )) {
0 commit comments