Answer the question
In order to leave comments, you need to log in
How to properly upload images in laravel 5.6?
Good afternoon ! How to properly load images using standard laravel tools? First, I generate a symbolic link to the public folder in storage / app using the standard command from the php artisan storage:link documentation, then I create a symbolic link storage in the public folder. Now when my files end up in storage/app/public they will also be in public/storage. So, and now when I load the picture
with the standard "store" method, this method will generate the path for me like this: "public/KMJQzZou4a6X3dZaPxtAV11j6LhpgHq8N9MpuVOg.jpeg" and, accordingly, then I will save it to the database, now the question is:$request->file('avatar')->store('public')
{{ url($kitchen->img) }}
When I want to pull this image out of the database, its path will lead to publc/...imageName, but the funny thing is that I don’t have any public folder in the public folder)) There is only storage. I would be happy if you suggest options how to fix it))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question