php - How to change public folder to public_html in laravel 7?

one text

Solution:

To change the public path of Laravel 7

Open the index.php file located at public/index.php

Then after the line: $app = require_once __DIR__.'/../bootstrap/app.php';

Enter the following code below:

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

You can change the public_html to any folder name you intend to use.

This works perfectly for me. Got it from https://www.skillsugar.com/how-to-change-the-public-directory-path-in-laravel-7

Source