refactor(plans): use BackUrl::withBack for create/edit/order links in index

This commit is contained in:
萝卜
2026-03-14 20:05:09 +00:00
parent 3975a87cb9
commit 730677628b

View File

@@ -154,7 +154,7 @@
<p class="muted muted-xs">后续将从这里进入套餐详情、授权项与订阅联动。</p>
</div>
@php
$createPlanUrl = '/admin/plans/create?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]);
$createPlanUrl = \App\Support\BackUrl::withBack('/admin/plans/create', $selfWithoutBack);
@endphp
<a href="{!! $createPlanUrl !!}" class="btn btn-sm">新建套餐</a>
</div>
@@ -208,12 +208,11 @@
</td>
<td>
@php
$editPlanUrl = '/admin/plans/' . $plan->id . '/edit?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]);
$createOrderUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query([
$editPlanUrl = \App\Support\BackUrl::withBack('/admin/plans/' . $plan->id . '/edit', $selfWithoutBack);
$createOrderUrl = \App\Support\BackUrl::withBack('/admin/platform-orders/create?' . \Illuminate\Support\Arr::query([
'plan_id' => $plan->id,
'order_type' => 'new_purchase',
'back' => $selfWithoutBack,
]);
]), $selfWithoutBack);
@endphp
<div class="actions gap-10">
<a href="{!! $editPlanUrl !!}" class="btn btn-secondary btn-sm">编辑</a>