<?php

namespace Modules\DailyLog\Exports;

use App\User;
use Maatwebsite\Excel\Concerns\FromCollection;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\Exportable;

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

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


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