<?php

namespace Modules\Company\Exports;

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

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

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


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