<?php

namespace App\Exports;

use App\Artist;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;

class ArtistsExport implements FromCollection, WithHeadings
{
    public function collection()
    {
        return Artist::select('id', 'name', 'slug', 'created_at', 'updated_at')->get();
    }

    public function headings(): array
    {
        return ['id', 'name', 'slug', 'created_at', 'updated_at'];
    }
}
