<?php

namespace App\Exports;

use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\WithTitle;


class TransactionBladeExport implements FromView, WithTitle
{
    private $data;

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

    public function view(): View
    {
        return view('transaction::detail_transaction', [
            'data' => $this->data
        ]);
    }

    public function title(): string
    {
        return 'Detail Transaction';
    }
}