File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 7171 */
7272 'cookie_minutes ' => 60 * 24 * 365 , // 1 year
7373
74+ /**
75+ * Check raw cookie with $_COOKIE due to the default encryption by Laravel.
76+ */
77+ 'check_raw_cookie ' => false ,
78+
7479 /**
7580 * The detectors to use to find a matching locale.
7681 * These will be executed in the order that they are added to the array!
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ class CookieDetector implements Detector
1515 public function detect ()
1616 {
1717 $ key = Config::get ('localized-routes.cookie_name ' );
18-
19- return Cookie::get ($ key );
18+ if (Config::get ('localized-routes.check_raw_cookie ' )) {
19+ return $ _COOKIE [$ key ] ?? null ;
20+ } else {
21+ return Cookie::get ($ key );
22+ }
2023 }
2124}
You can’t perform that action at this time.
0 commit comments