dev-master
9999999-devYii-Framework extension for uploading and cropping images
MIT
The Requires
- yiisoft/yii2 *
- yiisoft/yii2-imagine ^2.1
- bower-asset/jcrop =0.9.12
- meliorator/yii2-helpers *
by Laba Mykola
extension yii2 crop image jcrop
Yii-Framework extension for uploading and cropping images
Yii-Framework extension for uploading and cropping images., (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist meliorator/yii2-picturizer "*"
or add, (*4)
"meliorator/yii2-picturizer": "*"
to the require section of your composer.json
file., (*5)
Picturizer does not use the ajax-simple-upload-button or another ajax upload methods. Picturizer use only the HTTP POST method for upload files., (*6)
Once the extension is installed, simply use it in your code by :, (*7)
<?= \meliorator\picturizer\Picturizer::widget(); ?>
and need attach behavior PicturizerControllerBehavior to controller. Example :, (*8)
use meliorator\picturizer\PicturizerControllerBehavior;
```php
return [
'avatar' => [
'class' => PicturizerControllerBehavior::className(),
'savePath' => '@webroot/images/employees'
]
];, (*9)
and call saveUploadedImage method for save image : ```php $newFileName = $this->saveUploadedImage();
Yii-Framework extension for uploading and cropping images
MIT
extension yii2 crop image jcrop