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