ws-cv-ua / ws-referral-link
This package for hiding original link and show info about following
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/ws-cv-ua/ws-referral-link
Requires
- php: >=5.4
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2025-10-10 07:31:51 UTC
README
- Run command
composer require ws-cv-ua/ws-referral-link
- Run migration
yii migrate --migrationPath=@vendor/ws-cv-ua/ws-referral-link/migrations
- Set referral action in frontend controller. For example:
... public function actions() { return [ ... 'referral' => [ 'class' => '\wscvua\ws_referral_link\actions\ReferralAction', ], ... ]; } ...
- Set referral module in admin (backend) part of application. For example:
... 'modules' => [ 'referral' => [ 'class' => \wscvua\ws_referral_link\Module::className(), 'adminPermission' => ['admin'] ], ... ], ...
adminPermission is needle permission for access module
- Referral widget example:
use wscvua\ws_referral_link\widgets\ReferralLink; ReferralLink::widget([ 'url' => $url, 'controller' => 'site' ]);
If controller field not set, then it will be have value of current controller