Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mightyteja/8d565acb443a61c0536061ff8dd7447f to your computer and use it in GitHub Desktop.
Save mightyteja/8d565acb443a61c0536061ff8dd7447f to your computer and use it in GitHub Desktop.
Renaming LARAVEL public folder to public_html for shared hosting
Open the file
config/filesystems.php
Replace 'root' => storage_path('app/public') with 'root' => storage_path('app/public_html')
'public' => [
'driver' => 'local',
'root' => storage_path('app/public_html'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
And
open
app/Providers/AppServiceProvider
Bind public directory in app/Providers/AppServiceProvider register method
public function register()
{
$this->app->bind('path.public', function() {
return base_path('public_html');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment