@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $selected = collect($template->field_mappings ?? [])->keyBy('metric'); $grouped = collect($metrics)->groupBy('group', preserveKeys: true); @endphp
@csrf @method('PUT')
Fields and column headings

Tick a field to include it, and optionally rename its CSV column to match the form you file.

@foreach($grouped as $group => $groupMetrics)

{{ ucfirst($group) }}

@foreach($groupMetrics as $key => $meta)
@endforeach
@endforeach
Download CSV