<?php

namespace App\Exports;

use \Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithTitle;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

class StaffOutTurnover implements FromCollection, WithTitle, ShouldAutoSize
{
    /**
    * @return \Illuminate\Support\Collection
    */
    private $data;

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

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

    public function title(): string
    {
        return 'Staff Out Turnover';
    }
}
