[您好,我目前正在处理旧版laravel代码,我想从存储中显示页面上的图像,我该怎么做?我在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);
$filePath = storage_path('app/public/payment/'.$filename);