<?php

namespace App\Imports;

use App\Models\Narudzbe;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithHeadingRow;

class NarudzbaImport implements ToModel, WithHeadingRow
{
    public function model(array $row)
    {
        return new Narudzbe([
            'artikal' => $row['P. O. Date'], // Mapirajte prvi stupac u kolonu 'artikal'
            'br_naloga' => $row['Article Number'],
        ]);
    }
}