| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 9 | 
| Code Lines | 5 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 2 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 61 | public function setFileAttribute(string $value): void | ||
| 62 |     { | ||
| 63 | $request = \Request::instance(); | ||
| 64 | |||
| 65 | // Check if a new file has been uploaded if not then save value to file attribute | ||
| 66 |         if ($request->hasFile('file')) { | ||
| 67 | $this->uploadFileToDisk($value, 'file', 'public', 'resources'); | ||
| 68 |         } else { | ||
| 69 | $this->attributes['file'] = $value; | ||
|  | |||
| 70 | } | ||
| 73 |