Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 642 Bytes

File metadata and controls

32 lines (21 loc) · 642 Bytes

Yii2 file/image upload behavior for ActiveRecord

FileUploadBehavior

This behavior allow you to add file and image uploading logic with ActiveRecord behavior.

Usage

Attach the behavior to your controller class:

public function behaviors()
{
    return [
        'reflink' => [
            'class' => '\yiidreamteam\reflink\ReflinkBehavior',
            'queryParam' => 'ref',
            'sessionVar' => 'referrerId',
        ],
    ];
}

Use

$this->getReferrerId();

Licence

MIT

Contacts