bulan = $bulan; $this->tahun = $tahun; } public function collection() { return DB::table('cashiers') ->join('products', 'cashiers.produk_id', '=', 'products.id') ->select( 'products.nama_produk as Nama_Produk', 'cashiers.jumlah_item as Jumlah_Item', 'cashiers.total as Total_Bayar', 'cashiers.tipe_bayar as Metode_Bayar', 'cashiers.createdAt as Waktu_Tanggal' ) ->whereMonth('cashiers.createdAt', $this->bulan) ->whereYear('cashiers.createdAt', $this->tahun) ->get(); } public function headings(): array { return ['Nama Produk', 'Jumlah Item', 'Total Bayar', 'Metode Bayar', 'Waktu Tanggal']; } }