@php $totalRows = 1; if (isset($record) && is_object($record)) { $indices = array_filter(array_map(function($key) { return strpos($key, 'date_co') === 0 ? (int)substr($key, 7) : 0; }, array_keys((array)$record))); if (!empty($indices)) { $totalRows = max($indices); } } @endphp @if(isset($record) && is_object($record)) @php $maxIndex = 0; foreach($record as $key => $value) { if(strpos($key, 'date_co') === 0) { $i = (int)substr($key, 7); $maxIndex = max($maxIndex, $i); } } @endphp @for($i = 1; $i <= $maxIndex; $i++) @endfor @else @endif
相談受理日 氏名 性別 国籍・地域 生年月日 在留カード番号 相談内容 対応結果 対応者の氏名 @if ($type != 'detail') @endif
{{ $i }}
1