Class 'Illuminate\Support\Facades\Http' not found in Laravel 1


This error occurs if you are using Laravel version <=6.0. It can be fixed by upgrading Laravel version 6.0 to 7.0

To upgrade Laravel 6.0 to Laravel 7.0, use the following steps:

Step 1:

Update the composer.json file with the following:

 

laravel/framework to ^7.0

nunomaduro/collision to ^4.1

phpunit/phpunit to ^8.5

laravel/tinker to ^2.0

facade/ignition to ^2.0

Step 2:

 

Now you need to update the following file:

app/Exceptions/Handler.php

 

Add use Throwable; just after use Exception;

 

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

public function report(Exception $exception)  // replace Exception with Throwable

    {

        parent::report($exception);

    }

    public function render($request, Exception $exception)  // replace Exception with Throwable

    {

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

    }

with the following Throwable functions. It should look like the following:

 

public function report(Throwable $exception)

    {

        parent::report($exception);

    }

    public function render($request, Throwable $exception)

    {

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

    }

Step 3:

Now upgrade the Laravel version by running the following command:

 

composer update

Step 4:

Now check the Laravel version by this command:

php artisan --version