Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | * |
||
39 | * @param ImageManager $imageManager |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function handle(ImageManager $imageManager) |
||
44 | { |
||
45 | if ($this->image) { |
||
46 | $fileName = str_shuffle($this->article->id.time().time()).'.png'; |
||
47 | $ogSave = storage_path('app/public/news/original/').$fileName; |
||
48 | $imageManager->make($this->image)->save($ogSave); |
||
49 | $this->article->image()->updateOrcreate([ |
||
50 | 'imageable_id' => $this->article->id, |
||
51 | ], [ |
||
57 |