Unisharp Laravel File Manager where /public is \public_html

Viewed 633

I am using Laravel 8. My site's public directory is public_html and I have made the appropriate changed to the appservice provider:

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

and changed the lfm is config to

'base_directory' => 'public_html',

The filemanager is uploading to the correct directory and making thumbnails in a subdirectory correctly, but it's view is a broken symbol.

I appreciate any help.

2 Answers

You have to bind the new storage path to the app instance. Please try this:

AppServiceProvider

public function register()
{
    $this->app->instance('path.storage', base_path() . '/public_html');
}
Related