| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function getRotateimage() |
||
| 29 | { |
||
| 30 | $image_name = request('img'); |
||
| 31 | $image_path = $this->lfm->setName($image_name)->path('absolute'); |
||
| 32 | $rotate_path = $image_path; |
||
| 33 | $angle = request('angle'); |
||
| 34 | |||
| 35 | event(new ImageIsRotating($image_path)); |
||
| 36 | |||
| 37 | // rotate the image |
||
| 38 | Image::make($image_path) |
||
| 39 | ->orientate() |
||
| 40 | ->rotate($angle) |
||
| 41 | ->save($rotate_path); |
||
| 42 | |||
| 43 | |||
| 44 | event(new ImageWasRotated($image_path)); |
||
| 45 | |||
| 46 | // make new thumbnail |
||
| 47 | $this->lfm->makeThumbnail($image_name); |
||
| 48 | } |
||
| 50 |