asset helper function after move into live server not work ?
I have a little bit confusing using asset helper function in laravel. For example i have laravel project in my local computer and all the uploads files in the public/uploads folder and i can run the server using php artisan serve and i can embed the images inside uploads folder like that asset('uploads/sample.jpg') this generate the url like http://127.0.0.1:8000/uploads/sample.jpg which work fine in my local development server.
But when i move my site into the shared hosting server and i configure the site without point the documentroot to public folder then the asset helper function generate the same url which didn't point actual image means the image didn't load.
public NEEDS to be document root. If not, your site is NOT secure. Like people can sometimes view your .env file by going to it in the url. Shared hosting isn't the best option most of the time since they generally don't give you very much, if any, control of your "space".
There are guides/tutorials on this site if you search for shared hosing. Depending on your host, you may be able to get it to work securely.