I'm putting my Laravel project in production and I've clone it from GitHub to: "/home/myuser/repositories/myuser/MYPROJECT-app", and my public Laravel folder content in "/home/myuser/public_html".
I've changed the "(project location)/app/Providers/AppServiceProvider.php" and add:
$this->app->bind('path.public',function(){
return '/home/myuser/public_html';
});
To the Register function. I changed the "index.php" from the public folder to match my project location and everything works well, except when I try to upload a file using the method:
Storage::disk('public')->put('myfiles/', $request->myFile)
It is stored in "/home/myuser/repositories/MYPROJECT-app/public/storage/myfiles" instead of "/home/myuser/public_html/storage/myfiles".
(Note: I cannot use symbolic links because some restrictions with the server configuration, so I'm trying to store all the files within a "storage" folder within the public path).
I'm guessing I'm missing some configuration to tell Laravel to store the uploaded files in "/public_html/storage" instead of "MYPROJECT/public/storage", but I can't find wich file I've to change.