- Timestamp:
- 11/11/21 21:36:24 (3 years ago)
- Branches:
- master
- Children:
- 4d73966
- Parents:
- 90ab388
- Location:
- app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Exports/FoldersExport.php
r90ab388 r1f7c934 29 29 $row->user_id . ' - ' . User::find($row->user_id)->username, 30 30 $row->Department::find($row->department_id)->name . ' - ' . Department::find($row->department_id)->code, 31 $row->version, 31 32 $row->created_at, 32 33 $row->updated_at … … 45 46 'Created by ID - Username', 46 47 'Department name - code', 47 ' Is important',48 'Version', 48 49 'Created at', 49 50 'Updated at' -
app/Http/Controllers/Dashboard/DepartmentsController.php
r90ab388 r1f7c934 158 158 $zip->close(); 159 159 $headers = array('Content-Type' => 'application/octet-stream'); 160 $zip_new_name = Carbon::now()->format('d.m.Y - H:i') . '-Departments.zip';160 $zip_new_name = Carbon::now()->format('d.m.Y - ') . 'Departments.zip'; 161 161 return response()->download($zip_file, $zip_new_name, $headers); 162 162 } … … 188 188 189 189 $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); 190 190 191 foreach ($files as $file) { 191 192 … … 198 199 } 199 200 } 201 200 202 $zip->close(); 201 203 $headers = array('Content-Type' => 'application/octet-stream'); 202 $zip_new_name = Carbon::now()->format('d.m.Y - H:i') . '- Departments.zip';204 $zip_new_name = Carbon::now()->format('d.m.Y - ') . $department->name . '.zip'; 203 205 return response()->download($zip_file, $zip_new_name, $headers); 204 206 } -
app/Http/Controllers/Dashboard/FoldersController.php
r90ab388 r1f7c934 286 286 } 287 287 } 288 288 289 $zip->close(); 289 290 $headers = array('Content-Type' => 'application/octet-stream',); 290 $zip_new_name = Carbon::now()->format('d.m.Y - H:i') . $folder->name . '.zip';291 $zip_new_name = Carbon::now()->format('d.m.Y - ') . $folder->name . '.zip'; 291 292 return response()->download($zip_file, $zip_new_name, $headers); 292 293 }
Note:
See TracChangeset
for help on using the changeset viewer.