| Total Complexity | 6 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class GetFiles |
||
| 11 | { |
||
| 12 | public function validateFile($fileID, $fileName) |
||
| 13 | { |
||
| 14 | $fileData = Files::where('file_id', $fileID)->where('file_name', $fileName)->first(); |
||
| 15 | |||
| 16 | if(!$fileData || !Storage::exists($fileData->file_link.$fileData->file_name)) |
||
| 17 | { |
||
| 18 | return false; |
||
| 19 | } |
||
| 20 | |||
| 21 | return $fileData->file_link.$fileData->file_name; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function canUserDownload($fileID, $authorized) |
||
| 34 | } |
||
| 35 | } |
||
| 36 |