A
A
Artemmmm132021-03-13 15:23:23
Laravel
Artemmmm13, 2021-03-13 15:23:23

Way to storage Laravel on live hosting?

You need to get a link to the file that is in storage/app/public/users/default.png
When the project was on the local server, I used the built-in method Storage::path and everything worked. But after uploading the project to a real hosting, everything breaks down. Executed the command php artisan storage:link, did not help.
Using the built-in path method, the following path was obtained storage/users/default.png. It was possible to get the file along the path storage/app/public/users/default.png. Is that how it should be? Or did I not deploy the project correctly? It turns out that you will have to manually register all links to the file by type:
<img src="/storage/app/public/users/.$img />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artemmmm13, 2021-03-14
@Artemmmm13

I found a solution to the issue, I hope it will be useful. First you need to delete the old link in the public folder that was made on the local server. And then do as it is written here
604dfbd958be7103521728.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question