I want to show image from storage

Hi I'm currently working on legacy laravel code I want to show the image on the page from storage how can i do it ? The code i have in web.php

Route::get('files/payment/{filename}', function($filename)

$filePath = storage_path().'/payment/'.$filename;

if (!File::exists($filePath))
{
return Response::make("File does not exist.", 404);
}

$fileContents = File::get($filePath);

return Response::make($fileContents,200);


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2GMIN9c
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time