@foreach ($departmentHardwares as $departmentHardware)
<tr>

    <td>{{ $loop->iteration }}</td>

    <td>{{ $departmentHardware['department'][0]['name'] }}</td>

    <td>{{ $departmentHardware['totalHardwares'] }}</td>

    <td> {{ $departmentHardware['totalCost'] ? $departmentHardware['totalCost'] . ' USD' : 0}} </td>

    <td>
        <a href="#" class="btn btn-primary btn-sm edit-hardware-mapping" data-department-id="{{ $departmentHardware['department'][0]['id'] }}" data-hardware-standard-count="{{ $departmentHardware['totalHardwares'] }}" data-make-and-model-id="{{ $departmentHardware['make_and_model_ids'] }}" data-technical-spec-id="{{ $departmentHardware['technical_spec_ids'] }}" data-costs="{{ $departmentHardware['costs'] }}" >Edit</a>
    </td>

</tr>
@endforeach