<?php

namespace App\Exports;

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

class CertificatRejectExport implements FromCollection,WithHeadings
{
    /**
    * @return \Illuminate\Support\Collection
    */
    public function collection()
    {
        return Certificat::select('id','notification_number',
        'amount','certificat_number','f_note'
        )
        ->where('f_status','2')
        ->get();
    }

     public function headings(): array
    {
        return [
            'رقم الطلب','رقم الاشعار','المبلغ','عدد الشهادات','التعليق'
        ];
    }

}
