PHP code example of ommu / yii2-dropzone

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

    

ommu / yii2-dropzone example snippets


use devgroup\dropzone\DropZone;

echo DropZone::widget([
    'name' => 'file', // input name or 'model' and 'attribute'
    'url' => '', // upload url
    'storedFiles' => [], // stores files
    'eventHandlers' => [], // dropzone event handlers
    'sortable' => true, // sortable flag
    'sortableOptions' => [], // sortable options
    'htmlOptions' => [], // container html options
    'options' => [], // dropzone js options
]);

use devgroup\dropzone\DropZone;

echo $form->field($model, "attribute")->widget(DropZone::className(), [
    'name' => 'file', // input name or 'model' and 'attribute'
    'url' => '', // upload url
    'storedFiles' => [], // stores files
    'eventHandlers' => [], // dropzone event handlers
    'sortable' => true, // sortable flag
    'sortableOptions' => [], // sortable options
    'htmlOptions' => [], // container html options
    'options' => [], // dropzone js options
]); 

php composer.phar