<?php
 
namespace App\Exports;
 
use App\Product;
use DB;

use App\Http\Controllers\ExportController;

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

class ReportExport implements FromCollection, WithHeadings
{
    
    //protected $tokoid, $tgl1, $tgl2, $grp, $group, $tptoko;

    function __construct() {

    }
    
    /**
    * @return \Illuminate\Support\Collection
    */
    public function collection()
    {
        
        $data = ExportController::getMaster();
        return $data;
        
    }
    
	/* header di excel */
    public function headings(): array
    {
        return ["ID","NAMA PRODUCT","HARGA"];
    }    
    
}


