dingo/api安装报错, Class Dingo\Api\Exception\Handler contains 1 abstract method解决方法.

 出现这样的报错:

 Class Dingo\Api\Exception\Handler contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Illuminate\Contracts\Debug  
  \ExceptionHandler::shouldReport)   

解决方法: 

把"require"里面的"dingo/api": "xxx"删掉, 

"require": {
    "liyu/dingo-serializer-switch": "^0.3.1"
},
还有相关的app.php文件里面关于dingo的providers和aliases去掉,
然后运行composer update
然后运行 php artisan vendor:publish --provider="Dingo\Api\Provider\LaravelServiceProvider"
解决.

你可能感兴趣的:(Laravel)