6
0
Fork 0
release
panliang 2022-05-18 14:03:09 +08:00
parent 41a6f3f5d0
commit 296eea470e
3 changed files with 18 additions and 1 deletions

View File

@ -66,6 +66,7 @@ class VipController extends AdminController
$show->filed('sort');
$show->field('status');
$show->field('description');
$show->field('gift')->view('admin.vip.gift');
$show->field('created_at');
$show->field('updated_at');
});

View File

@ -43,7 +43,7 @@ class VipController extends Controller
{
$user = $request->user();
$query = $user->vips();
$query = $user->vips()->where('status', 1);
$list = $query->paginate($request->input('per_page'));

View File

@ -0,0 +1,16 @@
<!--
模板中接收以下三个变量:
name 字段名称
value 字段值
model 当前行数据
-->
<div class="list-group">
@if($value['coupon'])
<div class="list-group-item">优惠券
@foreach(\App\Models\Coupon::whereIn('id', $value['coupon'])->get() as $item)
<span class="label bg-primary">{{ $item->name }}</span>
@endforeach
</div>
@endif
</div>