Skip to content

This package for hiding original link and show info about following

Notifications You must be signed in to change notification settings

ws-cv-ua/ws-referral-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. Run command
composer require ws-cv-ua/ws-referral-link
  1. Run migration
yii migrate --migrationPath=@vendor/ws-cv-ua/ws-referral-link/migrations
  1. Set referral action in frontend controller. For example:
...
public function actions()
{
    return [
        ...
        'referral' => [
            'class' => '\wscvua\ws_referral_link\actions\ReferralAction',
        ],
        ...
    ];
}
...
  1. 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

  1. 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

About

This package for hiding original link and show info about following

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages