| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function handle(ImageSaved $event) |
||
| 33 | { |
||
| 34 | $ogImage = storage_path('app/public/profile/original/').$event->getImage()->name; |
||
| 35 | $thumb100 = storage_path('app/public/profile/100-100/').$event->getImage()->name; |
||
| 36 | $thumb50 = storage_path('app/public/profile/50-50/').$event->getImage()->name; |
||
| 37 | |||
| 38 | $this->imageManager->make($ogImage)->fit(100, 100, function ($constraint) { |
||
| 39 | $constraint->upsize(); |
||
| 40 | $constraint->aspectRatio(); |
||
| 41 | }, 'center')->save($thumb100); |
||
| 42 | $this->imageManager->make($ogImage)->fit(50, 50, function ($constraint) { |
||
| 43 | $constraint->upsize(); |
||
| 44 | $constraint->aspectRatio(); |
||
| 45 | }, 'center')->save($thumb50); |
||
| 46 | } |
||
| 48 |