php - Laravel Deployment -> Cannot find FormRequestServiceProvider

I am trying to deploy my Laravel 8.24 Application on shared hosting (inside a subfolder). I followed this tutorial. I did everything, I seperated the public folder from the rest of the application and referenced it inside index.php:

require '../../partner_files/vendor/autoload.php';

$app = require_once '../..//partner_files/bootstrap/app.php';

I also edited the .env file correctly and made the storage softlink. But now, when I open up the URL to the Laravel Application, I receive the following error:

Class "Illuminate\Foundation\Providers\FormRequestServiceProvider" not found

The Laravel error

Now I am completely lost, I dont even know where this error originates.

Can some Laravel professional out there tell me what could be the cause of this error? Is something wrong with the paths, as it cannot find the file?

Is there a way to fix this?

EDIT

I fixed the path, but now , when I call the page, I only receive:

{ "name": "symfony/polyfill-php80", "type": "library", "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "keywords": ["polyfill", "shim", "compatibility", "portable"], "homepage": "https://symfony.com", "license": "MIT", "authors": [ { "name": "Ion Bazan", "email": "ion.bazan@gmail.com" }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "require": { "php": ">=7.1" }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, "files": [ "bootstrap.php" ], "classmap": [ "Resources/stubs" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } } }

Is this a problem with the PHP Version? I am using the same as on localhost

EDIT 2

My composer.json

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.4",
        "andcarpi/laravel-popper": "^0.9.4",
        "barryvdh/laravel-dompdf": "^0.9.0",
        "doctrine/dbal": "^3.0",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.12",
        "laravel/jetstream": "^2.1",
        "laravel/sanctum": "^2.6",
        "laravel/tinker": "^2.5",
        "livewire/livewire": "^2.0",
        "spatie/laravel-medialibrary": "^9.0.0",
        "ext-gd": "*"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        },
        "files": [
            "app/helpers.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

Answer

Solution:

$app = require_once '../..//partner_files/bootstrap/app.php';

I see a typo here, shouldn't it be like this:

$app = require_once '../../partner_files/bootstrap/app.php';

Source