| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function getFile() |
||
| 13 | { |
||
| 14 | //If we pass a filepath, use it and get out |
||
| 15 | if (Input::has('uploadedFile')) { |
||
| 16 | return Input::get('uploadedFile'); |
||
| 17 | } |
||
| 18 | //Process the excel file provided. |
||
| 19 | $file = Input::file('file'); |
||
| 20 | $fileName = $file->getClientOriginalName(); |
||
| 21 | Storage::disk('local')->put($fileName, File::get($file)); |
||
| 22 | |||
| 23 | $storagePath = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix(); |
||
| 24 | |||
| 25 | return $storagePath.$fileName; |
||
| 26 | } |
||
| 27 | |||
| 35 |