How To Change Laravel directory from public to public_html directory

If you’re using cPanel or VestaCP and you don’t wanna go through creating directory Symbolic link “symlink” you can make this change and just upload the public directory files to public_html instead

go to bootstrap/app.php and find :

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

add this code after it :

$app->bind('path.public', function ()
return base_path() . '/public_html';

save and upload.

if you need help with your laravel script installation create a ticket from here

Author: Ahmed Aly

Web & Apps Developer