alex-bond/yii2-thumbler "Class 'Thumbler' not found" 中的错误

Error in alex-bond/yii2-thumbler "Class 'Thumbler' not found"

如何使用此小部件 alex-bond/yii2-thumbler Link。我试过这样的东西

$path = \Yii::$app->thumbler->resize
        ('49_long.jpg',500,500, $method = Thumbler::METHOD_CROP_CENTER, $backgroundColor = 'ffffff', $callExceptionOnError = true);

正如那里所说,但我得到了一个错误 "Class 'Thumbler' not found"。我该如何使用它?

尝试添加对您的代码添加正确的引用

 use alexBond\thumbler\Thumbler;