
{{-- Customer Search List --}}

        <div class="row">
        
            <div class="table-responsive" >
                <table class="table">
                    <thead>
                        <tr>
                            <td><b>Customer Name</b></td>
                            <td><b>Mobile</b></td>
                            <td><b>Email</b></td>
                        </tr>
                    </thead>
                    <tbody>
                    
                        <tr>
                             <td>{{$User->name}}</td>
                           <td>  
                                @if($User->mobile)
                                    {{$User->mobile->mobile}}
                                @else
                                    No Mobile Registered    
                                @endif  
                            </td>    
                            <td>{{$User->email}}</td>
                        </tr>
                       
                    </tbody>
                </table>
            </div>
        </div>
        @php $si=0; @endphp
        @foreach($Orders as $Order)
        <div class
        <div class="table-responsive" >
        
            <table class="table table-bordered" id="search_tbl">
                <thead class="thead-light">
                    <tr>
                        <th>SLNO.</th>
                        <th>Order No.</th>
                        <th>Status</th>
                        <th>Duration</th> 
                        <th>Order Date</th>
                    </tr>
                </thead>
                <tbody>
                
                    <tr>
                        <td>{{++$si}}</td>
                        <td>{{$Order->id}}</td>
                        <td>{{$Order->status->title}}</td>
                        <td>{{$Order->duration->title}}</td>                       
                        <td>{{date_format(date_create($Order->created_at),'d-m-Y')}}</td>   
                    </tr>
                    
                    <tr>
                        <td rowspan="2" colspan="5">
                            <table class="table table-sm table-bordered">
                                <thead>
                                    <tr>
                                        <th>Product</th>
                                        <th>Service</th>
                                        <th>Quantity</th>
                                    </tr>
                                </thead>
                                <tbody>
                                @foreach($Order->order_products as $order_product)
                                    <tr>
                                        <td>{{$order_product->product->title}}</td>
                                        <td>
                                            @foreach($order_product->order_product_services as $order_service)
                                            <span class="badge badge-primary">{{$order_service->product_service->servicetype->title}}</span>
                                            @endforeach
                                        </td>
                                        <td>{{$order_product->quantity}}</td> 
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </tbody>
            </table>
           
        </div>
        @endforeach 
   

