31 lines
625 B
PHP
31 lines
625 B
PHP
<?php
|
|
|
|
namespace App\Exports;
|
|
|
|
use Maatwebsite\Excel\Concerns\FromArray;
|
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
|
|
|
class RefundAmountExport implements FromArray, WithColumnFormatting, ShouldAutoSize
|
|
{
|
|
protected $data;
|
|
|
|
public function __construct(array $data)
|
|
{
|
|
$this->data = $data;
|
|
}
|
|
|
|
public function array(): array
|
|
{
|
|
return $this->data;
|
|
}
|
|
|
|
public function columnFormats(): array
|
|
{
|
|
return [
|
|
'C' => NumberFormat::FORMAT_TEXT,
|
|
];
|
|
}
|
|
}
|