Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function __invoke(UploadImageRequest $request) |
||
18 | { |
||
19 | // Storage Path |
||
20 | $path = 'images/uploaded'; |
||
21 | $location = Storage::disk('public')->putFile($path, new File($request->file)); |
||
22 | |||
23 | Log::channel('user')->info('New image uploaded by '.$request->user()->username, $request->toArray()); |
||
24 | |||
25 | return Storage::url($location); |
||
1 ignored issue
–
show
|
|||
26 | } |
||
28 |