Laravel - File Storage - The Local Driver

When using the local driver, all file operations are relative to the root directory defined in your filesystems configuration file. By default, this value is set to the storage/app directory. Therefore, the following method would write to storage/app/example.txt:

    
    use Illuminate\Support\Facades\Storage;
    
    Storage::disk('local')->put('example.txt', 'Contents');