feat: plans create/edit keep back and return

This commit is contained in:
萝卜
2026-03-13 21:49:01 +00:00
parent f901ddc1a5
commit 91c6921362
3 changed files with 17 additions and 2 deletions

View File

@@ -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>