PHP code example of private-it / yii2-dropzone

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

    

private-it / yii2-dropzone example snippets


...
'bootstrap' => [
    'dropZone' => [
        'class' => \devgroup\dropzone\DropZoneBootstrap::className(),
        'autoRegisterAssets' => true,
        'autoRegisterController' => true,
    ]
],
...

<?= \devgroup\dropzone\DropZone::widget([
    'name' => 'file',
    'options' => [
        'addRemoveLinks' => true,
        // translate options:
        // 'dictRemoveFile' => '',
        // 'dictRemoveFileConfirmation' => '',
        // 'dictDefaultMessage' => '',
    ],
    'registerEventRemovedFile' => true,
])