@extends('layouts.base')

@section('content')
    <div class="container-fluid">
        <!-- start page title -->
        <div class="d-flex justify-content-between mt-2 mb-2">
            <h2>
                tour packages
            </h2>
            <ol class="breadcrumb m-0">
                {{-- <li class="breadcrumb-item"><a href="{{ route('apps') }}">ระบบจัดการ</a></li> --}}
                {{-- <li class="breadcrumb-item active">ข้อมูลลูกค้า</li> --}}
            </ol>
        </div>
        <!-- end page title -->

        @if ($message = Session::get('success'))
            <div class="alert alert-success">
                <p>{{ $message }}</p>
            </div>
        @endif

        <div class="card">
            <div class="card-body">
                <!-- command bar -->
                {{-- <div class="d-flex justify-content-between">
                    <div>
                        <a class="btn btn-success mb-2" href="{{ route('places.create') }}">
                            <i class="mdi mdi-plus-thick"></i> new hashtag
                        </a>
                    </div>

                </div> --}}
                <!-- end command bar -->
                <table class="table">
                    <thead>
                        <tr class="text-center">
                            {{-- <th>ลำดับ</th> --}}
                            <th>id</th>
                            <th>title</th>
                            <th>price</th>
                            <th>discount</th>
                            <th>tour_size</th>
                            <th>duration</th>
                            <th>package_type</th>
                            <th>province_id</th>
                        </tr>
                    </thead>
                    <tbody>
                        @forelse ($tourPackages as $index => $tourPackage)
                            <tr>
                                <td class="text-center"> {{ $tourPackage->id }}
                                </td>
                                <td>{{ $tourPackage->title }}</td>
                                <td>{{ $tourPackage->price }}</td>
                                <td>{{ $tourPackage->discount }}</td>
                                <td>{{ $tourPackage->tour_size }}</td>
                                <td>{{ $tourPackage->duration }}</td>
                                <td>{{ $tourPackage->package_type }}</td>
                                <td>{{ $tourPackage->province_id }}</td>
                            </tr>
                        @empty
                            <tr>
                                <td colspan="14">ไม่มีรายการให้แสดง</td>
                            </tr>
                        @endforelse
                    </tbody>
                </table>
                {{-- <div class="d-flex justify-content-between">

                    <div>
                        {{ $hashtags->links('pagination.paginate') }}
                    </div>
                    <div>
                        หน้าที่ {{ $hashtags->currentPage() }} จาก {{ $hashtags->lastPage() }}
                    </div>
                </div> --}}
            </div>
        </div>
        <!-- end table -->
    </div>
@endsection
