找不到类别'Maatwebsite \ Excel \ Excel'

S.M*_*ian 2 php laravel

我的composer.json

    ...
    "maatwebsite/excel": "^3.0",
    ...
Run Code Online (Sandbox Code Playgroud)

我可以在localhost上运行我的项目,但是当我在服务器上上传时,出现以下错误消息:

Class 'Maatwebsite\Excel\Excel' not found
Run Code Online (Sandbox Code Playgroud)

我的laravel版本:

Laravel Framework 5.5.40
Run Code Online (Sandbox Code Playgroud)

我的公共目录:

在此处输入图片说明

public_html / public / index.php

<?php

/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylor@laravel.com>
 */

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/


require __DIR__.'/../bootstrap/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/../bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);
Run Code Online (Sandbox Code Playgroud)

我的网站:

http://alsatmarketing.com/

更新

运行后出现此错误composer require maatwebsite/excel:^3.0

 Problem 1
    - Installation request for maatwebsite/excel 3.0 -> satisfiable by maatwebsite/excel[3.0.0].
    - Conclusion: remove laravel/framework v5.5.40
    - Conclusion: don't install laravel/framework v5.5.40
    - maatwebsite/excel 3.0.0 requires illuminate/support ^5.6 -> satisfiable by illuminate/support[v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17,
v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.3, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].
    - don't install illuminate/support v5.6.4|don't install laravel/framework v5.5.40
    - don't install illuminate/support v5.6.5|don't install laravel/framework v5.5.40
    - don't install illuminate/support v5.6.6|don't install laravel/framework v5.5.40
    - don't install illuminate/support v5.6.7|don't install laravel/framework v5.5.40
    - don't install illuminate/support v5.6.0|don't install laravel/framework v5.5.40
    - don't install illuminate/support v5.6.1|don't install laravel/framework v5.5.40
    - illuminate/support v5.6.10 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.11 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.12 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.13 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.14 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.15 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.16 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.17 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.19 conflicts with laravel/framework[v5.5.40].
    - don't install illuminate/support v5.6.2|don't install laravel/framework v5.5.40
    - illuminate/support v5.6.20 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.21 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.22 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.23 conflicts with laravel/framework[v5.5.40].
    - don't install illuminate/support v5.6.3|don't install laravel/framework v5.5.40
    - illuminate/support v5.6.8 conflicts with laravel/framework[v5.5.40].
    - illuminate/support v5.6.9 conflicts with laravel/framework[v5.5.40].
    - Installation request for laravel/framework (locked at v5.5.40, required as 5.5.*) -> satisfiable by laravel/framework[v5.5.40].


Installation failed, reverting ./composer.json to its original content.
Run Code Online (Sandbox Code Playgroud)

Que*_*ler 7

尝试运行:

composer require maatwebsite/excel:^3.0.1

(问题注释中的命令可能会抱怨锁定文件)