PHP code example of exocet / yii2-upload-file-behavior

1. Go to this page and download the library: Download exocet/yii2-upload-file-behavior 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/ */

    

exocet / yii2-upload-file-behavior example snippets


    use exocet\yii2UploadFileBehavior\UploadFileBehavior;
    

    public $upload_file;
    

    [['image_path'], 'safe'],
    

    public function behaviors() {
        return [
            'uploadFileBehavior' => [
                'class' => UploadFileBehavior::className(),
                'nameOfAttributeStorage' => 'image_path',
                //... other configurations
            ],
        ];
    }