Horje
laravel - access file from storage path - alternative to symlink Code Example
laravel - access file from storage path - alternative to symlink
Route::get('storage/{filename}', function ($filename)
{
    $path = storage_path('public/' . $filename);

    if (!File::exists($path)) {
        abort(404);
    }

    $file = File::get($path);
    $type = File::mimeType($path);

    $response = Response::make($file, 200);
    $response->header("Content-Type", $type);

    return $response;
});




Php

Related
namespace not working php Code Example namespace not working php Code Example
laravel orm tutorial Code Example laravel orm tutorial Code Example
require_once in class php Code Example require_once in class php Code Example
php if simple Code Example php if simple Code Example
Class "App\Http\Controllers\Admin\Auth" not found Code Example Class "App\Http\Controllers\Admin\Auth" not found Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7