<?php

namespace Modules\User\Exports;

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

class EmployeeExport implements FromView
{
    /**
     * @return \Illuminate\Support\Collection
     */

    public function __construct($rows,$user)
    {
        $this->rows = $rows;
        $this->user = $user;
    }


    public function view(): View
    {
        return view('admin.users.excel.employees', [
            'employees' => $this->rows,
            'user' => $this->user,
        ]);
    }
}
