Initial commit - lms-v2 + CLAUDE.md
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromArray;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
|
||||
class EmployeeTemplateExport implements FromArray, WithHeadings, ShouldAutoSize
|
||||
{
|
||||
public function headings(): array
|
||||
{
|
||||
// PENTING: Header ini dibaca oleh Controller, jangan diubah formatnya
|
||||
return [
|
||||
'nik', 'no_ktp', 'inisial', 'nama_depan', 'nama_belakang',
|
||||
'email', 'telepon', 'jenis_kelamin', 'tgl_lahir', 'tgl_masuk',
|
||||
'department_id', 'position_id'
|
||||
];
|
||||
}
|
||||
|
||||
public function array(): array
|
||||
{
|
||||
return [
|
||||
// Baris contoh (Gunakan format YYYY-MM-DD untuk tanggal)
|
||||
['10102023', '3201012345678901', 'BDS', 'Budi', 'Santoso', 'budi@perusahaan.com', '0812345678', 'L', '1990-01-30', '2023-01-01', '1', '2'],
|
||||
['10102024', '', 'STA', 'Siti', 'Aminah', 'siti@perusahaan.com', '0887654321', 'P', '1995-12-15', '2023-05-10', '1', '3'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user