<?php

namespace App\Imports;

use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Mtc\MercuryDataModels\SeoData;

class SeoHeadingImport implements ToModel, WithHeadingRow
{
    public function model(array $row)
    {
        SeoData::query()
            ->updateOrCreate([
                'path' => $row['path']
            ], [
                'heading' => $row['heading'],
            ]);
    }
}
