@extends('back-end.master.app')
@section('title', 'customer')
@section('body')
    <main class="app-content">
        <section class=" gradient-custom-2">
            <div class="">
                <div class="row d-flex justify-content-center align-items-center h-100">
                    <div class="col-md-12 col-xl-12">
                        <div class="card mask-custom">
                            <div class="card-header">
                                <div class="row">
                                    <div class="col-md-8">
                                        <h4>Subscribtion Contacts</h4>
                                    </div>
                                    <div class="col-md-4">
                                        {{-- <div class="" style="float: right">
                                            <a href="{{ route('posts.create') }}"
                                                class="btn btn-primary btn-sm btn-rounded mt-5" style="float: right">Add
                                            </a>
                                        </div> --}}
                                    </div>
                                </div>
                            </div>
                            <div class="card-body p-4 ">
                                <div class="row">
                                    <div class="col-md-12">
                                        <table class="table  mb-0 data_table">
                                            <thead>
                                                <tr>
                                                    <th scope="col">#</th>
                                                    <th scope="col">Name</th>
                                                    {{-- <th scope="col">Phone</th> --}}
                                                    <th scope="col">Email</th>
                                                    <th scope="col">Subject</th>
                                                    <th scope="col">Action</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                @foreach ($data as $row)
                                                    <tr class="fw-normal">
                                                        <th class="border-0">{{ $loop->iteration }}</th>
                                                        <th class="border-0">{{ $row->name }}</th>
                                                        {{-- <th class="border-0">{{ $row->phone }}</th> --}}
                                                        <th class="border-0">{{ $row->email }}</th>
                                                        <th class="border-0">{{ $row->subject }}</th>


                                                        <td class="border-0 align-middle">
                                                            <a href="" data-mdb-toggle="tooltip" title="view"><i
                                                                    class="fas fa-eye fa-lg text-info me-3"></i></a>

                                                        </td>

                                                    </tr>
                                                @endforeach

                                            </tbody>
                                            {{ $data->links('pagination::bootstrap-4') }}
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </section>
    </main>
@endsection


@section('pageJs')
    <script type="text/javascript">
        $(".app-menu").removeClass("active");
        $("#nav_stocki").addClass("active");
        $("#stocki").addClass("is-expanded");
        $("#posts").addClass("active");
    </script>
@endsection
