Total Complexity | 7 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Export |
||
10 | { |
||
11 | public function export(Builder $query, $ext = 'xls') |
||
12 | { |
||
13 | // Create new export |
||
14 | $export = new ModelExport; |
||
15 | |||
16 | $export->type = $ext; |
||
17 | $export->query = $query->getModel(); |
||
18 | |||
19 | $export->save(); |
||
20 | |||
21 | ExportJob::dispatch($export)->onQueue('exporting'); |
||
22 | |||
23 | return $export; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Return export progress. |
||
28 | * |
||
29 | * @param int $id |
||
30 | * @return \Illuminate\Http\Response json |
||
31 | */ |
||
32 | public function returnExportProgress($id) |
||
51 | } |
||
52 | |||
53 | public function downloadExportedFile($id) |
||
63 | } |
||
64 | } |
||
65 |