@extends('layouts.layout')

@section('content')
    <div class="main-panel">

        @include('layouts.component.navbar')

        <div class="content">

            <div class="container-fluid">
                <div class="row">

                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header card-header-primary">
                                <h4 class="card-title ">Cancelled Data</h4>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive">
                                    <table class="table">
                                        <thead class=" text-primary">
                                        <th>
                                            #
                                        </th>
                                        <th>
                                            Date Of Purchase
                                        </th>
                                        <th>
                                            Name
                                        </th>
                                        <th>
                                            User
                                        </th>
                                        <th>
                                            Id
                                        </th>
                                        <th>
                                            Type
                                        </th>
                                        </thead>
                                        <tbody>
                                        @forelse($dat as $data)
                                            <tr>
                                                <td>{{ $loop->index + 1 }}</td>
                                                <td>{{ $data->dateOfPurchase }}</td>
                                                <td>{{ $data->name }}</td>
                                                <td>{{ $data->user }}</td>
                                                <td>{{ $data->idSecond }}</td>
                                                <td>{{ $data->type }}</td>
                                            </tr>
                                        @empty
                                            <tr>
                                                <td colspan="6" class="text-center"><h3>No Data Found</h3></td>
                                            </tr>
                                        @endforelse
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        @include('layouts.component.footer')

    </div>
@endsection
