<?php

namespace App\Exports;

use App\Models\BookingSource;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;

class BookingSourcesExport implements FromCollection, WithHeadings
{
    public function headings(): array
    {
        return [
            'title',
        ];
    }

    /**
     * @return \Illuminate\Support\Collection
     */
    public function collection()
    {
        return BookingSource::all()->makeHidden([
            'id',
            'created_at',
            'updated_at',
        ]);
    }
}
