I want to retrieve public url for all the files stored using
storage::putFile('public/spares');
So, this is the issue I'm using
storage::files('public/spares');
but it provides this output from laravel storage directory
public/spares/image1.jpg
public/spares/image2.jpg
public/spares/image3.jpg
how can I get the public link for the above
http://localhost/laravel/public/storage/spares/image1.jpg
http://localhost/laravel/public/storage/spares/image2.jpg
http://localhost/laravel/public/storage/spares/image3.jpg
**Edit **
Sending last modified data of files to view
$docs = File::files('storage/document');
$lastmodified = [];
foreach ($docs as $key => $value) {
$docs[$key] = asset($value);
$lastmodified[$key] = File::lastmodified($value);
}
return view('stock.document',compact('docs','lastmodified'));
Is this correct