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