Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function postExportData() |
||
10 | { |
||
11 | $this->limit = request('limit'); |
||
|
|||
12 | $this->indexReturn = true; |
||
13 | $filename = request('filename'); |
||
14 | $papersize = request('page_size'); |
||
15 | $paperorientation = request('page_orientation'); |
||
16 | $indexContent = $this->getIndex(); |
||
17 | |||
18 | if (request('default_paper_size')) { |
||
19 | $this->table('cms_settings')->where('name', 'default_paper_size')->update(['content' => $papersize]); |
||
20 | } |
||
21 | $format = request('fileformat'); |
||
22 | if(in_array($format, ['pdf', 'xls', 'csv'])) |
||
23 | { |
||
24 | return app(IndexExport::class)->{$format}($filename, $indexContent, $paperorientation, $papersize); |
||
25 | } |
||
33 | } |