refactor(subscriptions): use BackUrl::withBack for links on index
This commit is contained in:
@@ -158,7 +158,6 @@
|
||||
@php
|
||||
$q = [
|
||||
'order_type' => 'renewal',
|
||||
'back' => $selfWithoutBack,
|
||||
];
|
||||
if ((int) ($filters['merchant_id'] ?? 0) > 0) {
|
||||
$q['merchant_id'] = (int) $filters['merchant_id'];
|
||||
@@ -166,7 +165,7 @@
|
||||
if ((int) ($filters['plan_id'] ?? 0) > 0) {
|
||||
$q['plan_id'] = (int) $filters['plan_id'];
|
||||
}
|
||||
$createOrderFromSubIndexUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($q);
|
||||
$createOrderFromSubIndexUrl = \App\Support\BackUrl::withBack('/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($q), $selfWithoutBack);
|
||||
@endphp
|
||||
<a class="btn btn-sm" href="{!! $createOrderFromSubIndexUrl !!}">创建续费订单(带当前筛选)</a>
|
||||
</div>
|
||||
@@ -199,9 +198,7 @@
|
||||
<td>{{ $subscription->id }}</td>
|
||||
<td>
|
||||
@php
|
||||
$subShowUrl = '/admin/site-subscriptions/' . $subscription->id . '?' . \Illuminate\Support\Arr::query([
|
||||
'back' => $back,
|
||||
]);
|
||||
$subShowUrl = \App\Support\BackUrl::withBack('/admin/site-subscriptions/' . $subscription->id, $back);
|
||||
@endphp
|
||||
<a href="{!! $subShowUrl !!}">{{ $subscription->subscription_no }}</a>
|
||||
@php
|
||||
@@ -211,7 +208,6 @@
|
||||
'site_subscription_id' => $subscription->id,
|
||||
'quantity' => 1,
|
||||
'remark' => $remarkPrefix . $subscription->subscription_no,
|
||||
'back' => $back,
|
||||
];
|
||||
if ((int) ($subscription->merchant_id ?? 0) > 0) {
|
||||
$q['merchant_id'] = (int) $subscription->merchant_id;
|
||||
@@ -219,7 +215,7 @@
|
||||
if ((int) ($subscription->plan_id ?? 0) > 0) {
|
||||
$q['plan_id'] = (int) $subscription->plan_id;
|
||||
}
|
||||
$renewOrderUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($q);
|
||||
$renewOrderUrl = \App\Support\BackUrl::withBack('/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($q), $back);
|
||||
@endphp
|
||||
<div class="mt-4">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $renewOrderUrl !!}">续费下单</a>
|
||||
|
||||
Reference in New Issue
Block a user