<div class="card-body" id="tables">
    <div class="table-responsive">
        <form action="{!! route('appointment-doctor-shift-days.store', ['doctor_id' => $doctor_id, 'shift_id' => $shift_id]) !!}" method="post" enctype='multipart/form-data'>

            @csrf
            @method('patch')
            <table class="table table-bordered align-middle" style="width:100%">
                <thead class="table-light">
                    <tr>
                        <th class="thbutton">Sl No</th>
                        <th>Days</th>
                        <th class="thbutton">Active</th>
                    </tr>
                </thead>
                <tbody>
                   
                    @php
                        $doctor_days = explode(',', $doctor_days->days) ?? [];
                    @endphp
                    @foreach (daysOfWeek() as $key => $day)
                        <tr>
                            <td class="text-center">{{$key+1}}</td>
                            <td>
                               {!! $day !!}
                            </td>
                            <td class="text-center">
                                <input class="body-checkbox days_click" data-day_id="{{$key}}" type="checkbox" {!! in_array($key, $doctor_days) ? 'checked' : '' !!} name="day_id[{{ $key }}]">
                            </td>
                        </tr>
                    @endforeach
                </tbody>
            </table>
            {{-- <div class="col-12 mt-3 px-3">
                <button class="btn btn-primary" type="submit"><i class="bx bx-save"></i> Update Permissions</button>
            </div> --}}
        </form>
    </div>
</div>