Php Laravel Maatwebsite导出到excel不工作

Php Laravel Maatwebsite导出到excel不工作,php,excel,laravel,maatwebsite-excel,laravel-excel,Php,Excel,Laravel,Maatwebsite Excel,Laravel Excel,我正在使用Laravel 5.6和Laravel Maat Excel 3.1版。尽管我参考了官方文档,但在将数据导出到excel时仍然面临很多问题 下面是git中特定文档的链接 我正在尝试将一些数据导出到excel文件。但我没有得到工作,并且没有显示任何错误 下面是我的代码 php artisan make:export StudentAttendanceExport --model=Models\Student\StudentAttendenceModel 文件App\Exports\st

我正在使用Laravel 5.6和Laravel Maat Excel 3.1版。尽管我参考了官方文档,但在将数据导出到excel时仍然面临很多问题

下面是git中特定文档的链接

我正在尝试将一些数据导出到excel文件。但我没有得到工作,并且没有显示任何错误

下面是我的代码

php artisan make:export StudentAttendanceExport --model=Models\Student\StudentAttendenceModel
文件
App\Exports\studentattendenceexport

    <?php

namespace App\Exports;

use App\Models\Student\StudentAttendenceModel;
use Maatwebsite\Excel\Concerns\FromCollection;

class StudentAttendanceExport implements FromCollection
{
    /**
    * @return \Illuminate\Support\Collection
    */
    public function collection()
    {
        return StudentAttendenceModel::all();
    }
}
在上面的链接中,他们说
在下载文件夹中找到你的users.xlsx但路径为的路径已搜索所有目录,但仍未找到它


提前感谢使用
studenttendenceexport
代替
studenttencemodel

protected function processStdAttendance($data) {
         return Excel::download(new StudentAttendanceExport, 'users.xlsx');
         //return Excel::download(new StudentAttendenceModel, 'users.xlsx');
}

使用
studenttendenceexport
代替
studenttendencemodel

protected function processStdAttendance($data) {
         return Excel::download(new StudentAttendanceExport, 'users.xlsx');
         //return Excel::download(new StudentAttendenceModel, 'users.xlsx');
}

感谢您的回答。Hi Dhruv Raval要求为我的问题提供解决方案提前感谢您的回答。Hi Dhruv Raval要求为我的问题提供解决方案提前感谢