hi guys it works for me .... you can use it
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
public function register()
{
$this->app->bind('path.public', function() {
return realpath(base_path().'/../public_html');
});
}
?>
for the latest version of laravel the solution is to add this change in bootstrap/app.php.
$app->usePublicPath(base_path('public_html'));
after this line
$app = new Illuminate\Foundation\Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
Please or to participate in this conversation.