<?php

namespace App\Exports;

use Illuminate\Support\Enumerable;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Mtc\MercuryDataModels\SeoData;

class SeoHeadingExport implements FromCollection, WithHeadingRow
{
    public function collection(): Enumerable
    {
        return SeoData::query()
            ->whereNotNull('heading')
            ->select(['path', 'heading'])
            ->get();
    }
}
