From fd275adc7034dd82f9ef36e97fb7df3d18e3e27f Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Thu, 31 Jul 2025 11:56:36 +0800 Subject: [PATCH] 1 --- plugin/admin/app/controller/LogisticsShipController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugin/admin/app/controller/LogisticsShipController.php b/plugin/admin/app/controller/LogisticsShipController.php index 7ee3406..710ac07 100644 --- a/plugin/admin/app/controller/LogisticsShipController.php +++ b/plugin/admin/app/controller/LogisticsShipController.php @@ -62,10 +62,17 @@ class LogisticsShipController extends Crud */ public function insert(Request $request): Response { + $lang = session('lang', 'zh-cn'); + $translations = (array)require __DIR__ . '/../lang/' . $lang . '/ship.php'; + $common = (array)require __DIR__ . '/../lang/' . $lang . '/common.php'; + $translations = array_merge($translations, $common); if ($request->method() === 'POST') { return parent::insert($request); } - return view('logistics-ship/insert'); + return view('logistics-ship/insert', [ + 'lang' => $lang, + 'translations' => $translations + ]); } /**