PHP code example of phuongdev89 / yii2-cropper
1. Go to this page and download the library: Download phuongdev89/yii2-cropper library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phuongdev89 / yii2-cropper example snippets
php composer.phar
$form = ActiveForm::begin(['id' => 'form-profile']);
public function actions()
{
return [
'uploadPhoto' => [
'class' => 'phuongdev89\cropper\actions\UploadAction',
'url' => 'http://your_domain.com/uploads/user/photo',
'path' => '@frontend/web/uploads/user/photo',
]
];
}