refactor(admin): reuse filters hidden inputs partial in site subscriptions tools

This commit is contained in:
萝卜
2026-03-17 09:25:33 +08:00
parent d6ff43de79
commit 9a3df49d8f
2 changed files with 17 additions and 17 deletions

View File

@@ -1,10 +1,16 @@
@php
/**
* 统一输出“当前筛选上下文”的 hidden inputs。
* 用法:@include('admin.components.filters_hidden_inputs', ['filters' => $filters ?? []])
*
* 用法:
* @include('admin.components.filters_hidden_inputs', [
* 'filters' => $filters ?? [],
* // 可选:覆盖 keys不同页面可复用避免输出无关字段
* // 'keys' => ['status', 'merchant_id', ...],
* ])
*/
$filters = (array) ($filters ?? []);
$keys = [
$keys = (array) ($keys ?? [
'status',
'payment_status',
'merchant_id',
@@ -29,7 +35,7 @@
'refund_inconsistent',
'created_from',
'created_to',
];
]);
@endphp
@foreach($keys as $k)