关闭。这个问题需要debugging details .它目前不接受答案。
想改进这个问题?将问题更新为 on-topic对于堆栈溢出。
2年前关闭。
Improve this question
我正在使用 Laravel 6 并在部署到运行 PHP 7.3 的共享主机时出现以下错误:
App\Exceptions\Handler::report(Throwable $exception)
Declaration of App\Exceptions\Handler::report(Throwable $exception) must be compatible with Illuminate\Foundation\Exceptions\Handler::report(Exception $e) in /home/kb2hm3y8r4wm/public_html/laravel.supremeanimation.com/app/Exceptions/Handler.php on line 8
最佳答案
我认为你得到的错误是由于 Laravel 7(不是 6)的变化,你可以在 Laravel 7 upgrade guide 上看到。 .检查这个:
The report and render methods of your application's
App\Exceptions\Handler
class should accept instances of theException
interface instead ofThrowable
instances:
use Exception;
public function report(Exception $exception);
public function render($request, Exception $exception);
The report and render methods of your application's
App\Exceptions\Handler
class should accept instances of theThrowable
interface instead ofException
instances:
use Throwable;
public function report(Throwable $exception);
public function render($request, Throwable $exception);
关于php - Laravel 错误声明 App\Exceptions\Handler::report(Throwable $exception),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60670862/