<?php

namespace Modules\StockIssues\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;

class TestExport implements FromCollection, WithHeadings
{
    protected $data;

    public function __construct($data)
    {
        $this->data = $data;
    }

    public function collection()
    {
        return $this->data;
    }

    public function headings(): array
    {
        return [
            'id', 'name', 'sku', 'type', 'current stock', 'unit', /*'purchase line stock',*/ 'purchase price'
        ];
    }
}
