get(); } /** * @return array */ public function headings(): array { return [ 'ID', 'Periode', 'Authorization Status', 'Notes', 'Processed At', 'Created By', 'Created At', 'Updated By', 'Updated At', 'Authorized By', 'Authorized At' ]; } /** * @param mixed $row * * @return array */ public function map($row): array { return [ $row->id, $row->periode, $row->authorized_status, $row->notes, $row->processed_at ? Carbon::parse($row->processed_at)->format('Y-m-d H:i:s') : null, $row->created_by, $row->created_at ? Carbon::parse($row->created_at)->format('Y-m-d H:i:s') : null, $row->updated_by, $row->updated_at ? Carbon::parse($row->updated_at)->format('Y-m-d H:i:s') : null, $row->authorized_by ? ($row->authorizer ? $row->authorizer->name : $row->authorized_by) : null, $row->authorized_at ? Carbon::parse($row->authorized_at)->format('Y-m-d H:i:s') : null, ]; } /** * @param Worksheet $sheet * * @return array */ public function styles(Worksheet $sheet) { return [ // Style the first row as bold text 1 => ['font' => ['bold' => true]], ]; } }