To move to a server, I overwrite the public_path() in App Providers using this code:
public function register()
{
$this->app->bind('path.public', function() {
return base_path().'/public_html/img';
});
}
But instead of getting
/home/domain/img/image.jpg
I have
/Home/domain/laravelprojectname/public_html/img/image.jpg
Can someone help ? Thank you.