Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
53 | public function downloadExportedFile($id) |
||
54 | { |
||
55 | // Map export instance |
||
56 | $export = ModelExport::findOrFail($id); |
||
57 | |||
58 | if (! file_exists(storage_path('app/exports').'/'.$export->file) || empty($export->file)) { |
||
59 | abort(404); |
||
60 | } |
||
61 | |||
62 | return response()->download(storage_path('app/exports/'.$export->file)); |
||
63 | } |
||
65 |