@foreach($doctorreservations as $key=> $row)
<tr>
    <th scope="row">
        @if ($row->role != 'super_admin')
            <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>
        @endif

    </th>
    <td>{{ $row->patient->name }}</td>
    <td>{{ $row->branch->name }}</td>
    <td>{{ \Carbon\Carbon::parse($row->dating)->format('Y/m/d') }}</td>
    <td>{{ \Carbon\Carbon::parse($row->timing)->format('h:i a') }}</td>
  
    <td>
        @if($row->role == 'super_admin')
            <a href="{{ route ('doctorreservations.edit', $row->id) }}" class="icon" title="{{ __('dashboard.edit') }}"><img src="{{ asset('assets/admin/images/icons/draw.svg') }}" alt="{{ __('dashboard.edit') }}"></a>
        @else

            @if($row->deleted_at)
                <a href="{{ route ('doctorreservations.restore', $row->id) }}" data-method="put" class="icon rowAction" title="{{ __('dashboard.restore') }}"><img src="{{ asset('assets/admin/images/icons/restore.svg') }}" alt="{{ __('dashboard.restore') }}"></a>

              @else
                <a href="{{ route ('doctorreservations.edit', $row->id) }}" class="icon" title="{{ __('dashboard.edit') }}"><img src="{{ asset('assets/admin/images/icons/draw.svg') }}" alt="{{ __('dashboard.edit') }}"></a>

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

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