MINI MINI MANI MO

Path : /var/www/html/sistemas/spid/app/Exports/
File Upload :
Current File : /var/www/html/sistemas/spid/app/Exports/VotosExport.php

<?php

namespace App\Exports;

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

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

    public $votos;
    public $temas;

    public function __construct($votos, $temas)
    {
        //
        $this->votos = $votos;
        $this->temas = $temas;


//        return Excel::download(new UsersExport, 'users.xlsx');
    }
    public function view(): view
    {
        $votos = $this->votos;
        $tema = $this->temas;
        return view('votaciones.votoExcel', compact('votos','tema'));
    }
}

OHA YOOOO