Skip to content

Commit e610cf9

Browse files
committed
Fix when to trigger event ImageIsCropping
1 parent d68854b commit e610cf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/controllers/CropController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public function getCropimage()
3838
$dataWidth = request('dataWidth');
3939
$image_path = public_path() . $image;
4040

41+
event(new ImageIsCropping($image_path));
4142
// crop image
4243
Image::make($image_path)
4344
->crop($dataWidth, $dataHeight, $dataX, $dataY)
4445
->save($image_path);
45-
event(new ImageIsCropping($image_path));
4646

4747
// make new thumbnail
4848
Image::make($image_path)

0 commit comments

Comments
 (0)