@@ -34,7 +34,7 @@ public function createRoutes()
3434 protected function utilCheck ()
3535 {
3636 if (!File::exists ($ this ->listFileDir )) {
37- $ this ->localeCodes = array_keys (LaravelLocalization::getSupportedLocales ());
37+ $ this ->localeCodes = array_keys (LaravelLocalization::getSupportedLocales ());
3838 $ this ->listFileFound = false ;
3939
4040 $ this ->utilLoop ();
@@ -60,20 +60,20 @@ protected function utilLoop()
6060 protected function pageComp ($ page )
6161 {
6262 // 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 ;
6767 $ breadCrump = $ page ->getAncestors ();
6868
6969 // 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 ());
7373 $ routeName = $ page ->route_name ;
7474
7575 // middlewares
76- $ roles = 'role: ' .implode (', ' , $ page ->roles ()->pluck ('name ' )->toArray ());
76+ $ roles = 'role: ' .implode (', ' , $ page ->roles ()->pluck ('name ' )->toArray ());
7777 $ permissions = 'perm: ' .implode (', ' , $ page ->permissions ()->pluck ('name ' )->toArray ());
7878
7979 // make route
@@ -92,7 +92,7 @@ protected function routeGen($routeName, $url, $prefix, $action, $roles, $permiss
9292 }
9393
9494 // 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 ) {
9696 return compact ('template ' , 'title ' , 'body ' , 'desc ' , 'breadCrump ' );
9797 });
9898
@@ -117,7 +117,7 @@ protected function routeGen($routeName, $url, $prefix, $action, $roles, $permiss
117117 protected function createRoutesList ($ action , $ page , $ routeName )
118118 {
119119 foreach ($ this ->localeCodes as $ code ) {
120- $ url = $ page ->getTranslationWithoutFallback ('url ' , $ code );
120+ $ url = $ page ->getTranslationWithoutFallback ('url ' , $ code );
121121 $ prefix = $ page ->getTranslationWithoutFallback ('prefix ' , $ code );
122122
123123 if ($ this ->escapeEmptyRoute ($ url )) {
0 commit comments