0

I added flysystem to Lumen so I can use the Storage Facade.

I added the correct config file and then I'm trying:

$template = Storage::get(storage_path('a.html'));

Config:

'disks' => [
    'local' => [
        'driver' => 'local',
        'root' => storage_path(),
        'url' => env('APP_URL').'/storage',
    ],
    'public' => [
        'driver' => 'local',
        'root' => storage_path(),
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
    ],

I'm getting:

FileNotFoundException /var/www/storage/a.html

The file exists in that location.

Any clues?

Community
  • 1
  • 1
Tudor-Radu Barbu
  • 444
  • 1
  • 11
  • 28

1 Answers1

1

Try Storage::get(“a.html”) instead

George Hanson
  • 2,940
  • 1
  • 6
  • 18