1. Go to this page and download the library: Download jakharbek/yii2-filemanager 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 $_file_image;
public function getFileImage(){
return $this->$_file_image;
}
public function setFileImage($value){
return $this->$_file_image = $value;
}
public function rules()
{
return [
[['file_image'], 'safe']],
];
}
use \jakharbek\filemanager\widgets\FileInput;
use \jakharbek\filemanager\widgets\FileInput;
echo FileInput::widget(['id' => 'post_images_id']);