classe Application Last updated: 2020-04-07 14:51:51

laravel/app/Application.php

<?php

namespace App;

class Application extends \Illuminate\Foundation\Application {
    public function publicPath() {
        return realpath($this->basePath.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'public_html');
    }
}

e modificare laravel/bootstrap/app.php

da 

$app = new Illuminate\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);

a

/*
$app = new Illuminate\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
*/
$app = new App\Application(
    //realpath(__DIR__.'/../')
    dirname(__DIR__)
);