mardi 26 novembre 2019

Laravel 'Illuminate\Support\Facades\Storage' not found

I have a link that fetches a JSON file from a web link, and puts it in a directory in storage/app/internal/commons:

use Illuminate\Support\Facades\Storage;

function downloadLatestId(){

    $contents = file_get_contents("link/to/file.json");
    Storage::disk('local')->put('internal/commons/id.json', $contents);
}

which returns

PHP Fatal error:  Uncaught Error: Class 'Storage' not found in C:\dir\to\my\project\app\Commons\web\myCLass.php:12


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire