1. Go to this page and download the library: Download mheads/yii2-dbfiles 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/ */
mheads / yii2-dbfiles example snippets
return [
'components' => [
...
'dbFileStorage' => [
'class' => 'mheads\dbfiles\FileStorage',
'basePath' => '@frontend/web/upload',
'host' => $params['public_host'],
// Полный нобор свойств и их описания
// можно посмотреть в классе
// mheads\dbfiles\FileStorage
]
...
],
];