
PK 
<?php
namespace App\Exports;
use App\Models\Employee;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
class EmployeesExport implements FromCollection, WithHeadings
{
public function collection()
{
return Employee::select(
'emp_code',
'name',
'department',
'designation',
'email',
'phone',
'pan',
'bank_account',
'ifsc',
'basic_salary',
'status'
)->get();
}
public function headings(): array
{
return [
'Employee Code',
'Name',
'Department',
'Designation',
'Email',
'Mobile',
'PAN',
'Bank Account',
'IFSC',
'Basic Salary',
'Status'
];
}
}


PK 99