@extends('adminlte::page')

@section('content_header')
<h3> Mappa i campi </h3>
@endsection

@section('content')
<form action="{{ route('conti.map.store') }}" method="POST">
@csrf
    @foreach ($db as $header=>$table)
    <div class="row">
        <div class="col-md-3">
            <label>{{ $header }}</label>
        </div>
        <div class="col-md-6">
                <select name="mapping[{{ $table }}]">
        <option value="">--Nessuno o Selezionare una colonna--</option>
        @foreach($csv as $csv_header)
        <option value="{{ $csv_header }}">{{ $csv_header }}</option>
        @endforeach
    </select>
        </div>
    </div>

    @endforeach
    <input type="hidden" name="filename" value="{{ $filename .".csv" }}">
<button type="submit">Salva</button>
</form>
@endsection
