Changeset 8fdb18e for app/Http/Controllers/Dashboard/FoldersController.php
- Timestamp:
- 10/31/21 22:29:22 (3 years ago)
- Branches:
- master
- Children:
- 1451c6f
- Parents:
- 4521f25
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/Dashboard/FoldersController.php
r4521f25 r8fdb18e 146 146 $location = $folder->department->location . DIRECTORY_SEPARATOR . $request->name; 147 147 148 if (!Storage::disk(' uploads')->has($location)) {149 Storage::disk(' uploads')->makeDirectory($location);148 if (!Storage::disk('local')->has($location)) { 149 Storage::disk('local')->makeDirectory($location); 150 150 } 151 151 … … 254 254 $folder->delete(); 255 255 $location = $folder->department->location . DIRECTORY_SEPARATOR . $folder->name; 256 Storage::disk(' uploads')->deleteDirectory($location);256 Storage::disk('local')->deleteDirectory($location); 257 257 $folder->department()->decrement('no_of_folders'); 258 258 Alert::flash($folder->name . " deleted successfully"); … … 269 269 270 270 if($folder->no_of_files > 0) { 271 $zip_file = Storage::disk(' uploads')->path('Folder.zip');271 $zip_file = Storage::disk('local')->path('Folder.zip'); 272 272 $zip = new \ZipArchive(); 273 273 $zip->open($zip_file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 274 274 275 $path = Storage::disk(' uploads')->path($folder->department->location . DIRECTORY_SEPARATOR . $folder->name);275 $path = Storage::disk('local')->path($folder->department->location . DIRECTORY_SEPARATOR . $folder->name); 276 276 277 277 $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path));
Note:
See TracChangeset
for help on using the changeset viewer.