@foreach($chip_orders as $key=> $row)
    <tr>
        <th scope="row">
            <div class="custom-control custom-checkbox">
                <input type="checkbox" class="custom-control-input selectOne deleteCheck" id="customCheck{{$row->id}}" value="{{$row->id}}" name="id[]">
                <label class="custom-control-label" for="customCheck{{$row->id}}">{{-- $row->id --}}</label>
            </div>
        </th>
        <td>{{ $row->id }}</td>
        <td>{{ __('chip_orders.statuses.'.$row->status) }}</td>
        <td>{{$row->user->name ?? ''}}</td>
        <td>{{$row->user->phone ?? ''}}</td>
        <td>{{$row->total ?? ''}}</td>
        <td>{{$row->address->city->currentDescription->title ?? ''}}</td>
        <td colspan="2">{{ \Carbon\Carbon::parse($row->created_at)->format('Y/m/d') }}</td>
        <td>

            <div class="dropdown">
                <button class="icon_dots dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
                    <i class="bi bi-three-dots-vertical"></i>
                </button>
                <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                    @if($row->deleted_at ?? null)
                        <a href="{{ route ('chip_orders.restore', $row->id) }}" data-method="put" class="dropdown-item rowAction" title="{{ __('dashboard.restore') }}"> <i class="bi bi-pen ml-1"></i> {{ __('dashboard.restore') }} </a>

                        @if (!($row->total_users ?? null))
                            <a href="{{ route ('chip_orders.destroy', $row->id) }}" data-method="delete" class="dropdown-item rowAction" title="{{ __('dashboard.delete') }}"> <i class="bi bi-trash ml-1"></i> {{ __('dashboard.delete') }} </a>
                        @endif
                    @else
                        <a href="{{ route ('chip_orders.edit', $row->id) }}" class="dropdown-item" title="{{ __('dashboard.show') }}"> <i class="bi bi-pen ml-1"></i> {{ __('dashboard.show') }} </a>

                    @endif
                </div>
            </div>
        </td>
    </tr>
@endforeach

@if( count( $chip_orders ) && $chip_orders->hasPages() )
    <tr> <td> {{ $chip_orders->links() }} </td> </tr>
@endif
