<?php

namespace App\Exports;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\FromCollection;

class SignInOurReportExport implements FromCollection
{

	protected $exp_data;

	function __construct($exp_data) {

        $this->exp_data = $exp_data;
 	}


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

    public function view(): View
    {
    	// $data = collect($this->exp_data);
        return view('exports.sign_in_out_report', [
            'exp_datas' => $this->exp_data
        ]);
    }
}
