HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/hours.komma.pro/resources/views/excel/export.blade.php
<table>
    <thead>
        <tr>
            @foreach($attributes as $attribute)
                <th><strong>{{ __('excel.attributes.' . $attribute) }}</strong></th>
            @endforeach
        </tr>
    </thead>
    <tbody>

    <tr>
        <td colspan="{{ sizeof($attributes) }}">
            &nbsp;
        </td>
    </tr>

    @php
        /**
         * We create a counter for the rows, because this number is the count of total of the rows of each project
         * Excel already starts at 1 and we have already created a heading row and an empty row, so we start at 3.
         * @var int $excelRowCount
         */
        $excelRowCount = 3;
    @endphp
    @foreach($groups as $group)

        @continue($group->rows->count() == 0)

        @php
            /**
             * Assign the current row number to the group
             * @var \App\Komma\Excel\Types\ExcelGroup $group
             */
            $group->startRow = $excelRowCount;
        @endphp

        @foreach($group->rows as $row)

            <tr>
                @switch(get_class($row))

                    @case(\App\Komma\Excel\Types\Row\TitleRow::class)
                    <td colspan="{{ sizeof($attributes) }}">
                        <strong>
                            {{ $row->name }}
                        </strong>
                    </td>
                    @break

                    @case(\App\Komma\Excel\Types\Row\HourRow::class)
                    @case(\App\Komma\Excel\Types\Row\ExpenseRow::class)
                    @case(\App\Komma\Excel\Types\Row\AbsenceRow::class)
                    @foreach($attributes as $attribute)
                        <td @if($row->hasStyling()) style="{{ $row->getStylingProperties() }}" @endif >{{ $row->getValue($attribute) }}</td>
                    @endforeach
                    @break

                    @case(\App\Komma\Excel\Types\Row\FunctionRow::class)
                    @foreach($attributes as $attribute)

                        @if($row->isLabelColumn($loop->iteration))
                            <td style="text-align: right;"><strong>{{ $row->label }}</strong></td>
                        @elseif($row->isFunctionColumn($loop->iteration))

                            @if($row->functionType == \App\Komma\Excel\Types\Row\FunctionRow::TYPE_RANGE)
                                <td><strong>{{ $row->getRangeFunction($loop->iteration, $group->startRow, $excelRowCount) }}</strong></td>
                            @elseif($row->functionType == \App\Komma\Excel\Types\Row\FunctionRow::TYPE_CELLS && $group->codeName == 'summary')
                                <td><strong>{{ $row->getSummaryFunction($loop->iteration, $groups) }}</strong></td>
                            @endif

                        @else
                            <td>&nbsp;</td>
                        @endif

                    @endforeach
                    @break

                    @default
                        @php throw new UnexpectedValueException('Blade | excel.export: Model type "' . get_class($row) . '" has not been defined.'); @endphp
                    @break

                @endswitch
            </tr>

            @php $excelRowCount++; @endphp

        @endforeach

        {{-- If we have multiple projects / group we add two empty rows between them --}}
        @if($groups->count() > 1)
            <tr>
                <td colspan="{{ sizeof($attributes) }}">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="{{ sizeof($attributes) }}">
                    &nbsp;
                </td>
            </tr>
            @php $excelRowCount += 2; @endphp
        @endif

    @endforeach

    </tbody>
</table>