|
@@ -3,6 +3,7 @@
|
|
|
use Illuminate\Http\Request;
|
|
|
use Illuminate\Support\Arr;
|
|
|
use Illuminate\Support\Facades\Session;
|
|
|
+use Illuminate\Support\Facades\Cookie;
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
|
if (! function_exists('user_admin_config')) {
|
|
@@ -46,7 +47,8 @@ if (! function_exists('switchLanguage')) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- Session::put('lang', $lang);
|
|
|
+
|
|
|
+ Cookie::queue('lang', $lang, 60 * 24 * 30);
|
|
|
|
|
|
|
|
|
config(['app.locale' => $lang]);
|
|
@@ -56,8 +58,6 @@ if (! function_exists('switchLanguage')) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
if (!function_exists('getDistributor')) {
|
|
|
|
|
|
* 获取会话中的 distributor 值
|
|
@@ -327,4 +327,3 @@ if (!function_exists('truncateString')) {
|
|
|
return $string;
|
|
|
}
|
|
|
}
|
|
|
-
|