src/app/helpers/HCImageThumbs.php
protected function resizeImage($file, $setting)
    {
        $image = ImageManagerStatic::make($file);

        if( $setting->fit === "1" ) {
            $image->fit($setting->width, $setting->height, function ($constraint) use ($setting) {
                $constraint->upsize();
            });
        } else {
            $image->resize($setting->width, $setting->height, function ($constraint) use ($setting) {
                $constraint->aspectRatio();
                $constraint->upsize();
            });
        }

        return $image;
    }
protected function resizeImage($file, $setting)
    {
        $image = ImageManagerStatic::make($file);

        if( $setting->fit === "1" ) {
            $image->fit($setting->width, $setting->height, function ($constraint) use ($setting) {
                $constraint->upsize();
            });
        } else {
            $image->resize($setting->width, $setting->height, function ($constraint) use ($setting) {
                $constraint->aspectRatio();
                $constraint->upsize();
            });
        }

        return $image;
    }
protected function resizeImage ( $ file , $ setting ) { $ image = ImageManagerStatic :: make ( $ file ) ; if ( $ setting -> fit === "1" ) { $ image -> fit ( $ setting -> width , $ setting -> height , function ( $ constraint ) use ( $ setting ) { $ constraint -> upsize ( ) ; } ) ; } else { $ image -> resize ( $ setting -> width , $ setting -> height , function ( $ constraint ) use ( $ setting ) { $ constraint -> aspectRatio ( ) ; $ constraint -> upsize ( ) ; } ) ; } return $ image ; }
Resize image by given settings

@param $file
@param $setting
@return mixed
Resize image by given settings