@csrf @if ($method === 'PUT') @method('PUT') @endif
@php $marksValue = old('total_marks', $row ? ($row->total_marks ?: 20) : 20); @endphp
@php $attachmentRows = old('attachments'); if ($attachmentRows === null) { $attachmentRows = $row ? $row->attachments->map(fn ($a) => ['name' => $a->name, 'size' => $a->size, 'type' => $a->type])->all() : []; } @endphp
Attachments
@forelse ($attachmentRows as $i => $attachment)
{{ $attachment['name'] ?? '' }} {{ \App\Support\Fmt::attachmentSize($attachment['size'] ?? 0) }}
@empty
Drag & drop files here, or click to browse PDF, DOC, DOCX, JPG, PNG · max 10 MB
@endforelse
@if ($row) @endif