@extends('admin.layout')

@section('content')
    <div class="row">
        <div class="ibox-content">
            <div class="list-group">

                <div class="list-group-item">

                    <h3 class="list-group-item-heading">ID</h3>

                    <p class="list-group-item-text"> {{ $data['id'] or ''}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">优惠码名称</h3>

                    <p class="list-group-item-text"> {{ $data['name'] or ''}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">优惠券类型</h3>

                    <p class="list-group-item-text"> @if($data['type'] ==1)折扣@else固定金额@endif </p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">最低价格</h3>

                    <p class="list-group-item-text"> {{ $data['min_price'] or ''}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">折扣</h3>

                    <p class="list-group-item-text"> {{ $data['discount'] or ''}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">优惠金额</h3>

                    <p class="list-group-item-text"> {{ $data['discount_price'] or ''}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">可使用的产品</h3>

                    <p class="list-group-item-text"> {{ $data->product()->implode(',','')}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">数量</h3>

                    <p class="list-group-item-text"> {{ $data['count'] or ''}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">有效期</h3>

                    <p class="list-group-item-text"> {{ $data['end_time'] or ''}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">创建时间</h3>

                    <p class="list-group-item-text"> {{ $data['created_at'] or ''}}</p>

                </div>
                <div class="list-group-item">

                    <h3 class="list-group-item-heading">更新时间</h3>

                    <p class="list-group-item-text"> {{ $data['updated_at'] or ''}}</p>

                </div>
            </div>
        </div>
    </div>
@endsection