Laravel: 找不到导出

Laravel: Export is not found

我正在 laravel 项目中处理 Excel 导出。现在我得到这个错误:Class 'App\Export\UsersExport' not found 我做了另外 3 个并且他们工作了。这个没有,我似乎无法弄清楚是什么导致了这个错误。我正在使用 "Maatwebsite's Laravel-Excel".

我的导出控制器:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

//exports
use App\Export\UsersExport;
use App\Exports\StudyClassExport;
use App\Exports\EducationsExport;
use App\Exports\IntakesExport;
use Maatwebsite\Excel\Facades\Excel;
use App\Http\Controllers\Controller;

class ExportsController extends Controller
{
    public function users()
    {
        return Excel::download(new UsersExport, 'gebruikers.xlsx');
    }

    public function educations()
    {
        return Excel::download(new EducationsExport, 'opleidingen.xlsx');
    }

    public function classes()
    {
        return Excel::download(new StudyClassExport, 'klassen.xlsx');
    }

    public function intakes()
    {
        return Excel::download(new IntakesExport, 'intakes.xlsx');
    }
}

用户导出:

<?php

namespace App\Exports;

use App\User;
use Maatwebsite\Excel\Concerns\FromCollection;

class UsersExport implements FromCollection
{
    /**
    * @return \Illuminate\Support\Collection
    */
    public function collection()
    {
        return User::all();
    }
}

我不知道是什么导致了这个错误。其他的可以,但这个不行

你打错了:

use App\Export\UsersExport;

use App\Exports\UsersExport;

出口