PHP code example of possibilitycompany / yii2-resource-manager-component

1. Go to this page and download the library: Download possibilitycompany/yii2-resource-manager-component 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/ */

    

possibilitycompany / yii2-resource-manager-component example snippets

sh
php composer.phar 

// Defensive code checks not written for the example
$resource = yii\web\UploadedFile::getInstanceByName('instance-name');
$name = md5($resource->name) . '.' . $resource->getExtension();
if(\Yii::$app->resourceManager->save($resource, $name)) {
    echo 'Done...';
}