<?php

namespace App\Exports;

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

class DosenExport implements FromCollection, WithHeadings
{
    public function collection()
    {
        return Dosen::all(['nip', 'nama']);
    }

    public function headings(): array
    {
        return ['NIP', 'Nama'];
    }
}
