From 1725eae6b26b81f2b72f459c2314498af51a901f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Tue, 17 Mar 2026 19:13:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor(admin):=20=E5=8E=BB=E9=87=8D=E9=98=BB?= =?UTF-8?q?=E6=96=ADwarning=E8=BF=94=E5=9B=9E=E6=94=B9=E7=94=A8AdminFlash:?= =?UTF-8?q?:apply=E6=94=B6=E6=95=9Bwith=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/PlatformOrderController.php | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/app/Http/Controllers/Admin/PlatformOrderController.php b/app/Http/Controllers/Admin/PlatformOrderController.php index 33f5779..b17189f 100644 --- a/app/Http/Controllers/Admin/PlatformOrderController.php +++ b/app/Http/Controllers/Admin/PlatformOrderController.php @@ -1634,15 +1634,7 @@ class PlatformOrderController extends Controller $flash = \App\Support\BatchDispatchWarning::build('BAS ', $existing, 'bas'); - $res = redirect()->back()->with('warning', (string) ($flash['warning'] ?? '')); - - foreach (['warning_link_href', 'warning_link_label', 'warning_copy_text', 'warning_copy_label'] as $k) { - if (isset($flash[$k]) && (string) $flash[$k] !== '') { - $res = $res->with($k, (string) $flash[$k]); - } - } - - return $res; + return \App\Support\AdminFlash::apply(redirect()->back(), $flash); } \App\Jobs\BatchActivateSubscriptionsJob::dispatch( @@ -1790,15 +1782,7 @@ class PlatformOrderController extends Controller $flash = \App\Support\BatchDispatchWarning::build('BMPA ', $existing, 'bmpa'); - $res = redirect()->back()->with('warning', (string) ($flash['warning'] ?? '')); - - foreach (['warning_link_href', 'warning_link_label', 'warning_copy_text', 'warning_copy_label'] as $k) { - if (isset($flash[$k]) && (string) $flash[$k] !== '') { - $res = $res->with($k, (string) $flash[$k]); - } - } - - return $res; + return \App\Support\AdminFlash::apply(redirect()->back(), $flash); } \App\Jobs\BatchMarkPaidAndActivateJob::dispatch(