PHP code example of budyaga / yii2-cropper

1. Go to this page and download the library: Download budyaga/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/ */

    

budyaga / yii2-cropper example snippets


php composer.phar 

 $form = ActiveForm::begin(['id' => 'form-profile']); 

public function actions()
{
    return [
        'uploadPhoto' => [
            'class' => 'budyaga\cropper\actions\UploadAction',
            'url' => 'http://your_domain.com/uploads/user/photo',
            'path' => '@frontend/web/uploads/user/photo',
        ]
    ];
}