<?php


namespace Mehrab\Payment\excel;


use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use Mehrab\Payment\Repositories\PaymentRepo;

class ViewExcel implements FromView
{

    public function view(): View
    {
        $payments = resolve(PaymentRepo::class)->get_payments(request(),['paymentable', 'customer'],false);

        return view('Payment::Admin.list_payment_excel', [
            'payments' => $payments
        ]);
    }
}
