- 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/DepartmentsController.php
r4521f25 r8fdb18e 40 40 $location = 'Departments' . DIRECTORY_SEPARATOR . $request->code; 41 41 42 if(!Storage::disk(' uploads')->has($location)){43 Storage::disk(' uploads')->makeDirectory($location);42 if(!Storage::disk('local')->has($location)){ 43 Storage::disk('local')->makeDirectory($location); 44 44 45 45 } … … 77 77 { 78 78 $location = 'Departments' . DIRECTORY_SEPARATOR . $request->code; 79 if(!Storage::disk(' uploads')->has($location)){80 Storage::disk(' uploads')->move($oldLocation, $location);79 if(!Storage::disk('local')->has($location)){ 80 Storage::disk('local')->move($oldLocation, $location); 81 81 $department->location = $location; 82 82 } … … 136 136 137 137 if($flag) { 138 $zip_file = Storage::disk(' uploads')->path('Departments.zip');138 $zip_file = Storage::disk('local')->path('Departments.zip'); 139 139 $zip = new \ZipArchive(); 140 140 $zip->open($zip_file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 141 141 142 $path = Storage::disk(' uploads')->path('Departments');142 $path = Storage::disk('local')->path('Departments'); 143 143 144 144 $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); … … 180 180 181 181 if($flag) { 182 $zip_file=Storage::disk(' uploads')->path('Department.zip');182 $zip_file=Storage::disk('local')->path('Department.zip'); 183 183 $zip = new \ZipArchive(); 184 184 $zip->open($zip_file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 185 $path = Storage::disk(' uploads')->path($department->location);185 $path = Storage::disk('local')->path($department->location); 186 186 187 187 $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path));
Note:
See TracChangeset
for help on using the changeset viewer.