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);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire