1- <?php namespace Unisharp \Laravelfilemanager \controllers ;
1+ <?php
2+
3+ namespace Unisharp \Laravelfilemanager \controllers ;
24
3- use Unisharp \Laravelfilemanager \controllers \Controller ;
45use Intervention \Image \Facades \Image ;
56use Unisharp \Laravelfilemanager \Events \ImageIsCropping ;
67use Unisharp \Laravelfilemanager \Events \ImageWasCropped ;
78
89/**
9- * Class CropController
10- * @package Unisharp\Laravelfilemanager\controllers
10+ * Class CropController.
1111 */
1212class CropController extends LfmController
1313{
1414 /**
15- * Show crop page
15+ * Show crop page.
1616 *
1717 * @return mixed
1818 */
@@ -25,20 +25,19 @@ public function getCrop()
2525 ->with (compact ('working_dir ' , 'img ' ));
2626 }
2727
28-
2928 /**
30- * Crop the image (called via ajax)
29+ * Crop the image (called via ajax).
3130 */
3231 public function getCropimage ($ overWrite = true )
3332 {
34- $ dataX = request ('dataX ' );
35- $ dataY = request ('dataY ' );
33+ $ dataX = request ('dataX ' );
34+ $ dataY = request ('dataY ' );
3635 $ dataHeight = request ('dataHeight ' );
37- $ dataWidth = request ('dataWidth ' );
36+ $ dataWidth = request ('dataWidth ' );
3837 $ image_path = parent ::getCurrentPath (request ('img ' ));
39- $ crop_path = $ image_path ;
38+ $ crop_path = $ image_path ;
4039
41- if (! $ overWrite ) {
40+ if (! $ overWrite ) {
4241 $ fileParts = explode ('. ' , request ('img ' ));
4342 $ fileParts [count ($ fileParts ) - 2 ] = $ fileParts [count ($ fileParts ) - 2 ] . '_cropped_ ' . time ();
4443 $ crop_path = parent ::getCurrentPath (implode ('. ' , $ fileParts ));
0 commit comments