Thank you to hire a hosting that does not let me access beyond the public_html. I must put the whole project there, using public_html as root. Then separate in a folder called laravel, the whole project and leave loose in public_html everything that belonged to public
Changing the index a bit like this
require __DIR__.'/laravel/bootstrap/autoload.php';
$app = require_once __DIR__.'/laravel/bootstrap/app.php';
I started walking, I had a privilege problem, so at first the photos were not visible, the issue is that when uploading an image from my site, I created the public / img inside laravel and uploads the image correctly, but it is hosted there and not in the img inside public_html
A fragment of code of how I show an image
if($request->file('imagen'))
{
//Manipulacion de imagenes
$file= $request->file('imagen');
$nombre= 'emap_'.$evento->nombre.'-'.$fecha->toDateString().'.'.$file->getClientOriginalExtension();
$path = public_path().'/img/eventos';
$file->move($path,$nombre);
$evento->imagen = $nombre;
}
I have to get it to stay correctly from my root, which in my case is public_html / img /...
modifying the public_path () in app / Providers / AppServiceProvider in such a way that the public lowers a level to the public_html would be the solution
public function register()
{
$this->app->bind('path.public', function() {
return base_path().'/public_html'; // como moficar esta linea para que me imprima correctamente
});
}
I leave my site for easier to verify the problem: emap.com.ar