<?php
namespace App\Exports;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
class AmericanMonthReport implements FromCollection, WithHeadings
{
protected $data;
protected $headings;
public function __construct(Collection $data, array $headings)
{
$this->data = $data;
$this->headings = $headings;
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return $this->data;
}
/**
* @return array
*/
public function headings(): array
{
return $this->headings;
}
}