<?php

namespace App\Exports;

use App\Models\PaymentTransaction;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\FromView;

class PaymentTransactionsExport implements FromView
{

    public $paymentTransactions = [];

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

    public function view(): View
    {
        return view('exports.payment_tarnsactions', [
            'paymentTransactions' => $this->paymentTransactions,
        ]);
    }
}
