【问题标题】:pusher class not found when install tcpdf and maatwebsite/excel via composer通过 composer 安装 tcpdf 和 maatwebsite/excel 时找不到 pusher 类
【发布时间】:2017-07-19 12:15:07
【问题描述】:

当通过 composer 安装 pusher 时,它可以工作!

composer require pusher/pusher-php-server

但是当通过 composer >> pdf 和 excel 安装 elibyy/tcpdf-laravelma​​atwebsite/excel 时可以工作,但不能推送!!

错误>>找不到类推送器!

composer.json

"require": {
    "php": ">=5.6.4",
    "laravel/framework": "5.3.*",
    "caouecs/laravel-lang": "~3.0",
    "laravelcollective/html": "^5.3.0",
    "yajra/laravel-datatables-oracle": "6.25.0",
    "laravel/socialite": "2.0.21",
    "musonza/chat": "^1.0",
    "guzzlehttp/guzzle": "^6.2",
    "pusher/pusher-php-server": "^3.0",
    "illuminate/support": "5.3.*",
    "tecnickcom/tcpdf": "6.2.12",
    "elibyy/tcpdf-laravel": "5.3.0",
    "maatwebsite/excel": "2.1.*"
},

【问题讨论】:

    标签: composer-php laravel-5.3 tcpdf pusher maatwebsite-excel


    【解决方案1】:

    您是否将 Pusher 从 2.x 版本升级到 3.0.0?他们已经引入了命名空间,所以试试吧:

    new \Pusher\Pusher($auth_key, $secret, $app_id);
    

    或导入它:

    <?php
    
    use Pusher\Pusher;
    // ...
    
    $pusher = new Pusher($auth_key, $secret, $app_id);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-30
      • 2019-06-02
      • 2020-01-30
      • 1970-01-01
      • 1970-01-01
      • 2015-04-26
      相关资源
      最近更新 更多