Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Changed local route to use new storage render method
Browse files Browse the repository at this point in the history
  • Loading branch information
dmyers committed May 6, 2014
1 parent 9f766fc commit ede6e7a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@
// Register storage route.
\Route::get($route_path.'{path}', function ($path) {
try {
$file = Storage::get($path);
$response = Storage::render($path);
} catch (\Exception $e) {
\App::abort(404, 'File not found');
}

$mime = Storage::mime($path);

$response = \Response::make($file, 200, array(
'Content-Type' => $mime,
));

return $response;
});
}

0 comments on commit ede6e7a

Please sign in to comment.