PHP code example of alkurn / yii2-upload
1. Go to this page and download the library: Download alkurn/yii2-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/ */
alkurn / yii2-upload example snippets
'components' => [
'upload' => [
'class' =>'alkurn\upload\Upload',
'uploadsAlias' => Yii::getAlias('@storage/'),
'uploadsModel' => CoreMedia::class,
],
]
'bootstrap' => ['log', 'thumbnail', 'upload'],
use alkurn\upload\Upload;
$image = Yii::$app->upload->upload('image', $model);
php composer.phar