17 lines
342 B
PHP
17 lines
342 B
PHP
<?php
|
|
|
|
namespace App\Shared\Files;
|
|
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class LaravelStoredFileReader implements StoredFileReader
|
|
{
|
|
public function read(string $path): ?string
|
|
{
|
|
if (!Storage::disk('public')->exists($path)) {
|
|
return null;
|
|
}
|
|
|
|
return Storage::disk('public')->get($path);
|
|
}
|
|
}
|