PHP Fatal error:  Declaration of App\Exceptions\Handler::report(Exception $exception) must be compatible with Illuminate\Foundation\Exceptions\Handler::report(Throwable $e)  1


Solution:

Are you getting this error while upgrading Laravel 6 to Laravel 7? If yes, then you need to update the following file:

app/Exceptions/Handler.php

Replace the following Exception Functions of app/Exceptions/Handler.php

use Exception;

public function report(Exception $exception)

    {

        parent::report($exception);

    }

    public function render($request, Exception $exception)

    {

        return parent::render($request, $exception);

    }

with the following Throwable functions:

use Throwable;

public function report(Throwable $exception)

    {

        parent::report($exception);

    }

    public function render($request, Throwable $exception)

    {

        return parent::render($request, $exception);

    }