diff --git a/app/Exports/CustomerExport.php b/app/Exports/CustomerExport.php new file mode 100644 index 0000000..4e9304b --- /dev/null +++ b/app/Exports/CustomerExport.php @@ -0,0 +1,58 @@ +id, + $row->customer_code, + $row->name, + $row->address, + $row->branch_code, + $row->date_of_birth, + $row->email, + $row->created_at + ]; + } + + public function headings() + : array + { + return [ + 'ID', + 'Customer Code', + 'Name', + 'Address', + 'Branch Code', + 'Date of Birth', + 'Email', + 'Created At' + ]; + } + + public function columnFormats() + : array + { + return [ + 'A' => NumberFormat::FORMAT_NUMBER, + 'F' => NumberFormat::FORMAT_DATE_DMYSLASH, + 'G' => NumberFormat::FORMAT_DATE_DATETIME + ]; + } +}