PHP code example of mztest / yii2-widget-file-upload
1. Go to this page and download the library: Download mztest/yii2-widget-file-upload 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/ */
mztest / yii2-widget-file-upload example snippets
public function actions()
{
return [
'upload' => [
'class' => 'mztest\upload\actions\FileUploadAction',
],
];
}
use mztest\upload\FileUpload;
<?= $form->field($model, 'floor_image')->widget(FileUpload::className(), [
'uploadAction' => ['upload']
])
php composer.phar
"mztest/yii2-widget-file-upload": "*"