Created
April 2, 2017 00:42
-
-
Save AbdallaZaki/3fdf460d320ee06d931af4bda901890e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('public/previewimages/{filename}', function ($filename) { | |
$storagePath = storage_path('app/images/'.$filename); | |
\Log::debug($storagePath); | |
if(!\File::exists($storagePath))return response("not found",404); | |
return response()->file($storagePath); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment