Support the ongoing development of Laravel.io →
Configuration Input Security

I successfully uploaded file in storage : here is rhe storage image:

Storage pic

I tried to setup public disc by editing the .env .I just added here a line of code :

FILESYSTEM_DRIVER=public

I added this line on line 16 .here is the env image:

env pic

I did not change any code from my config/filesystems.php . my filesystem image:

filesystem 1 pic

filesystem 2 pic

after all done I use the code to display my image in this way: page:

Page

here is page resource code image:

page resource pic

I also used the artisan cmd php artisan storage:link to link the storage to public. It can be noticed from the top storage image . That's all I have done . but the image can not be seen .

please someone help me out here.What should i do?

Last updated 2 years ago.
0

your path is wrong try this asset('storage') . '/posts/' . $file->name

Last updated 5 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Nymur Rahman nymur Joined 14 Nov 2018

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.