Reputation: 109
My Laravel app was running successfully locally on my PC using WAMP server
PHP 7.4.0
Laravel 7.20.0
WAMP 3.2.0
When I deployed my app on a RedHat server,
PHP 7.4.9
Laravel 7.20.0
Appache 2.4.6
RedHat 7
I faced the below error when I make an HTTP request:
Error: Class 'Illuminate\Support\facades\Http' not found in file /var/www/html/chatbot/app/Http/Controllers/BotController.php on line 25
The only difference is the PHP version
composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2.5",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/helpers": "^1.2",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"yajra/laravel-datatables-oracle": "^9.10"
},
"require-dev": {
"filp/whoops": "^2.0",
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"autoload": {
.
.
And please note that locally, i upgraded my laravel version from laravel 5 to laravel 7 from the beginning.
Do i have to install anything else on the server to make an HTTP request ?
Upvotes: 0
Views: 1879
Reputation: 2271
Change Illuminate\Support\facades\Http
=> Illuminate\Support\Facades\Http
. The f
in facade needs to be in uppercase.
File names in Linux are case sensitive while in Windows/NTFS file systems, it's not. So, locally, it would not be a problem since your environment is Windows (assumed from WAMP).
Upvotes: 2