@php $modalName = $modalName ?? 'edit-batch'; $batch = $batch ?? null; $show = $show ?? false; $isOldEdit = old('_batch_form') === 'edit'; $batchId = $isOldEdit ? old('_batch_id') : $batch?->getRouteKey(); $courseTitle = $isOldEdit ? old('_batch_course_title') : $batch?->course?->title; $formAction = $batchId ? route('dashboard.batches.update', ['batch' => $batchId]) : '#'; $selectedDays = $isOldEdit ? old('class_days', []) : (array) ($batch?->class_days ?? []); $returnUrl = old('redirect_to', request()->getRequestUri()); $days = ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']; @endphp Edit Batch {{ old('name', $batch?->name ?? 'Update batch') }} {{ $courseTitle ? 'Course: '.$courseTitle : 'Update schedule, status and live class link.' }} @csrf @method('PUT') Name @error('name') {{ $message }} @enderror Start date @error('start_date') {{ $message }} @enderror End date @error('end_date') {{ $message }} @enderror Class days @foreach($days as $day) {{ $day }} @endforeach @error('class_days') {{ $message }} @enderror @error('class_days.*') {{ $message }} @enderror Class time @error('class_time') {{ $message }} @enderror Status status) === 'upcoming')>Upcoming status) === 'running')>Running status) === 'completed')>Completed @error('status') {{ $message }} @enderror Live class link (optional) @error('live_class_link') {{ $message }} @enderror Cancel Save Changes @once @push('scripts') @endpush @endonce
Edit Batch
{{ $courseTitle ? 'Course: '.$courseTitle : 'Update schedule, status and live class link.' }}
{{ $message }}