@extends('layouts.homeapp')
@section('content')


<!-- ======= Hero Section ======= -->
<section id="hero" class="shadow d-flex align-items-center pb-5 mt-5">
    <div class="container">
        
            <div class="card-header">
                <div class="">
                    <div class="mr-auto p-2 align-self-center"><h5>Order Number: {{$Order->id}}</h5></div>
                </div>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                            @php $Slno=0; @endphp
                                <th>Slno</th>
                                <th>Product</th>
                                <th>Services</th>
                                <th>Quantity</th>
                            </tr>
                        </thead>
                        
                        <tbody>
                        @foreach($Order->order_products as $order_product)
                            <tr>
                                <td>{{++$Slno}}</td>
                                <td>{{$order_product->product->title}}</td>
                                <td>
                                    @foreach($order_product->order_product_services as $ProductServices)
                                        <button class="btn btn-outline-primary mt-2">{{$ProductServices->product_service->servicetype->title}}</button>
                                    @endforeach                        
                                </td>
                                <td>{{$order_product->quantity}}</td> 
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
       
    </div>
</section>
@endsection  