<?php

namespace Modules\Category\Exports;

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

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

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


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