This behavior allow you to add file and image uploading logic with ActiveRecord behavior.
Attach the behavior to your controller class:
public function behaviors()
{
return [
'reflink' => [
'class' => '\yiidreamteam\reflink\ReflinkBehavior',
'queryParam' => 'ref',
'sessionVar' => 'referrerId',
],
];
}
Use
$this->getReferrerId();
MIT