update code

This commit is contained in:
manhlab
2021-04-07 06:32:42 -04:00
parent 7fb98911a6
commit a4753625f6
779 changed files with 335717 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Exports;
use PhpOffice\PhpSpreadsheet\Shared\Date;
class PrivateDocumentsExport extends BaseDocumentsExport
{
public function headings(): array
{
return [
'Ngày ban hành',
'Ký hiệu',
'Loại',
'Trích yếu',
'Người nhận',
];
}
/**
* @param mixed $document
*
* @return array
*/
public function map($document): array
{
return [
Date::dateTimeToExcel($document->effective_at),
$document->symbol,
$document->type->name,
$document->abstract,
implode(', ', ($document->organizes->map(function($organize){
return $organize->name;
}))->toArray()),
];
}
}