1. Go to this page and download the library: Download mhndev/yii2-media 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/ */
mhndev / yii2-media example snippets
namespace app\models;
use mhndev\yii2Media\Interfaces\iEntity;
use mhndev\yii2Media\Traits\EntityTrait;
use yii\db\ActiveRecord;
/**
* Class Post
* @package app\models
*/
class Post extends ActiveRecord implements iEntity
{
use EntityTrait;
/**
* @return string
*/
public static function tableName()
{
return 'posts';
}
}