In Laravel 5.1. When using the local driver, note that all file operations are related to the root directory defined in your configuration file. By default, this value is set to the repository / application directory. Hence,
the following method will save the file in storage / app / file.txt:
Storage::put('file.txt', 'Contents');
this will delete the file.txt file in the repository / application
Storage::delete('file.txt');
If you want to change the root directory, take ' storage / app / uploads / ', you can install the system.php file as follows:
'disks' => [ 'local' => [ 'driver' => 'local', 'root' => storage_path('app/uploads/'), ], ...
then this next method will save the file in storage / app / uploads / file.txt:
Storage::put('file.txt', 'Contents');
this will delete the file.txt file in the storage / application / download directory.
Storage::delete('file.txt');
source share