Класс 'Maatwebsite \ Excel \ Excel' не найден - PullRequest
0 голосов
/ 27 мая 2018

my composer.json:

    ...
    "maatwebsite/excel": "^3.0",
    ...

Я могу запустить свой проект на локальном хосте, но при загрузке на сервер я получаю это сообщение об ошибке:

Class 'Maatwebsite\Excel\Excel' not found

моя версия laravel:

Laravel Framework 5.5.40

мой публичный каталог:

enter image description here

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);

мойвеб-сайт:

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.

1 Ответ

0 голосов
/ 27 мая 2018

Попробуйте запустить:

composer require maatwebsite/excel:^3.0.1

(команды в комментариях к вопросу, скорее всего, будут жаловаться на блокировку файлов)

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...