Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

martinszeltins's avatar

How to access files from blade in my storage directory?

I have a file in my storage directory in /storage/invoices/invoice.pdf and I can't access it from my blade view file.

For example:

<a href="{{ storage_path() . '/invoices/' . $data->invoice_pdf }}">

this generates this url

http://localhost/var/www/new_project/storage/invoices/invoice_07_11_2018_18_59_36.pdf
0 likes
4 replies
martinszeltins's avatar

Thanks this helped

ln -s /var/www/new_project/storage /var/www/new_project/public/storage
goatshark's avatar

@martinzeltin Nice. And if you don't want to manually link it, I believe that's exactly what php artisan storage:link does. Glad you got it figured out.

Please or to participate in this conversation.