<?php

namespace App\Exports;

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

class IssueExport implements FromCollection, WithHeadings
{
  protected $issueCollection;


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

  public function headings(): array
  {
    return [
      'Nome',
      'Codice',
      'Quantita'
    ];
  }

  /**
  * @return \Illuminate\Support\Collection
  */
  public function collection()
  {
    return $this->issueCollection;
  }
}
