old写法

This commit is contained in:
Jerry Yan 2022-08-01 17:34:34 +08:00
parent 4e72845135
commit dc07742be8

View File

@ -18,23 +18,23 @@
@endif
<label class="block my-2">
追加内容(点播可不填)
<input class="form-input border-0 border-b-2 w-full" type="text" name="name" value="{{ old('name') || $append->name }}">
<input class="form-input border-0 border-b-2 w-full" type="text" name="name" value="{{ old('name', $append->name) }}">
</label>
<label class="block my-2">
点播老板
<input class="form-input border-0 border-b-2 w-full" type="text" name="from" value="{{ old('from') || $append->from }}">
<input class="form-input border-0 border-b-2 w-full" type="text" name="from" value="{{ old('from', $append->from) }}">
</label>
<label class="block my-2">
是否点播(不是追加)
<input class="form-checkbox" type="checkbox" name="is_original" value="1" @if($append->is_original == 1) checked @endif>
<input class="form-checkbox" type="checkbox" name="is_original" value="1" @if(old('is_original', $append->is_original) == 1) checked @endif>
</label>
<label class="block my-2">
<input class="form-input border-0 border-b-2 w-full" type="number" step="0.5" name="price" value="{{ old('price') || $append->price }}">
<input class="form-input border-0 border-b-2 w-full" type="number" step="0.5" name="price" value="{{ old('price', $append->price) }}">
</label>
<label class="block my-2">
补充说明
<input class="form-input border-0 border-b-2 w-full" type="text" name="append" value="{{ old('append') || $append->append }}">
<input class="form-input border-0 border-b-2 w-full" type="text" name="append" value="{{ old('append', $append->append) }}">
</label>
@if($errors->any())
@foreach ($errors->all() as $error)