@foreach($subTasks as $subtask) @php $subTaskCount = (isset($subtask->files)) ? $subtask->files->count() : 0; @endphp