php - How to change public folder to public_html in Laravel - Stack Overflow

PHOTO EMBED

Wed Sep 20 2023 06:46:44 GMT+0000 (Coordinated Universal Time)

Saved by @Zeeshan0811 #laravel

*** For laravel versions < 10 put this line
    $app->bind('path.public', function() {
        return __DIR__;
    });
just after this line

    $app = require_once __DIR__.'/../../{applicationname}/bootstrap/app.php';

****For laravel version >= 10 add this line
    $app->usePublicPath(__DIR__);
just after this line

    $app = require_once __DIR__.'/../../{applicationname}/bootstrap/app.php';
content_copyCOPY

https://stackoverflow.com/questions/30198669/how-to-change-public-folder-to-public-html-in-laravel