First you need to do
php artisan storage:link
so that your storage folder which the wepapp cannot access usually links with your public
folder so that your app can access the pictures like if they are in the public folder
but it will store them in the storage folder then you should put smthg like this to display the image
i think it will be like this
<img src="/storage/2/{{$p->file_name}}"/>
you could edit the path to the path in your application if this path didnt work
hope it works with you
Edit i will share with you an example from my code
in migration the users migration
$table->string('image');
controller
$imageName = time().'.'.request()->image->getClientOriginalExtension();
request()->image->move(public_path('userpicture'), $imageName);
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'image' => $imageName,
'password' => Hash::make($data['password']),
]);
note that the create method i am using here works only when you put those fildes fillable in the user model so never mind you could use whatever you want in the storing data part but concetrate on this three lines
$imageName = time().'.'.request()->image->getClientOriginalExtension();
request()->image->move(public_path('userpicture'), $imageName);
'image' => $imageName,
as you can see the move function is moving the picture to the public folder and putting it in userpicture folder and then the last line store the image name in the database so that i could access it later on to display the picture
and then i could just simply do this to display the picture
<img class="img-responsive img-rounded" src="{{ asset('userpicture/1561335133.jpg') }}" alt="User picture">
storage/app/publicfolder topublicfolder. Try runphp artisan storage:linkThe [public/storage] directory has been linked.publicfolder looks like? (Add a screenshot if possible)