feat: plans create/edit keep back and return
This commit is contained in:
@@ -66,8 +66,12 @@
|
||||
<textarea name="description" rows="4" placeholder="可描述套餐包含的能力与适用场景">{{ old('description', $plan->description) }}</textarea>
|
||||
</label>
|
||||
|
||||
@php
|
||||
$back = (string) ($back ?? '');
|
||||
$backUrl = $back !== '' ? $back : '/admin/plans';
|
||||
@endphp
|
||||
<div class="form-actions">
|
||||
<a href="/admin/plans" class="btn-secondary">返回</a>
|
||||
<a href="{{ $backUrl }}" class="btn-secondary">返回</a>
|
||||
<button type="submit">保存套餐</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -174,7 +174,10 @@
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/plans/{{ $plan->id }}/edit" class="link">编辑</a>
|
||||
@php
|
||||
$editPlanUrl = '/admin/plans/' . $plan->id . '/edit?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]);
|
||||
@endphp
|
||||
<a href="{!! $editPlanUrl !!}" class="link">编辑</a>
|
||||
|
||||
<form method="post" action="/admin/plans/{{ $plan->id }}/set-status" style="margin-top:6px;">
|
||||
@csrf
|
||||
|
||||
Reference in New Issue
Block a user