Best method to add lines with array input fields

Hi all,

I would like to add lines to a expense report.
Model Ndf and model NdfLine with hasMany relationship.

What’s the best approach to add lines with input, select and datepicker ? Any ideas ?
This tutorial does not work for me.

Here is my view :

<form wire:submit.prevent="submit">
@foreach($lines as $line)
<div class="row align-items-center">
    <div class="col-sm-2">
        <select class="form-control" wire:model.lazy="lines.{{ $loop->index }}.affair_id">
            <option value="0">{{ __('admin.ndfs.no_affair_concerned') }}</option>
            @if (!empty(backpack_user()))
                @foreach (backpack_user()->affair as $affair)
                <option value="{{ $affair->id }}">{{ $affair->label }}</option>
                @endforeach
            @endif
        </select>
    </div>
    <div class="col-sm-2">
        <select name="unbilled_code_id" class="form-control" wire:model.lazy="lines.{{ $loop->index }}.unbilled_code_id">
            @foreach ($unBilledCodes as $unbilledCode)
            <option value="{{ $unbilledCode->id }}">{{ $unbilledCode->name }}</option>
            @endforeach
        </select>
    </div>
    <div class="col-sm-2">
        <input type="text" class="form-control" placeholder="{{ __('admin.ndfs.fields.label') }}" wire:model.lazy="lines.{{ $loop->index }}.label">
    </div>
    <div class="col-sm-1">
        <label>
            <input type="text" class="form-control" placeholder="Valeur" wire:model.lazy="lines.{{ $loop->index }}.amount">
        </label>
    </div>
    <div class="col-sm-1">
        <label>
            <input type="text" class="form-control" placeholder="Valeur corrigée" wire:model.lazy="lines.{{ $loop->index }}.amount_corrected">
        </label>
    </div>
    <div class="col-sm-2">
        <label>
            <input type="text" class="form-control" placeholder="Date" wire:model.lazy="lines.{{ $loop->index }}.date">
        </label>
    </div>
    <div class="col-sm-1">
        <label>
            <input type="text" class="form-control" placeholder="Nb Justificatif" wire:model.lazy="lines.{{ $loop->index }}.quantity">
        </label>
    </div>
    <div class="col-sm-1 align-self-center">
        <button type="submit">+</button>
    </div>
</div>
@endforeach
</form>

And here is my component :

public function submit($id = null)
    {
        $this->validate([
            '*.affaire_id' => 'required',
            '*.unbilled_code_id' => 'required',
            '*.label' => 'required',
            '*.date' => 'required|date',
            '*.amount' => 'required|date'
            ]);


        dd($this->affair_id);

        session()->flash('message', 'Updated');
    }