PHP code example of ws-cv-ua / ws-referral-link

1. Go to this page and download the library: Download ws-cv-ua/ws-referral-link 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/ */

    

ws-cv-ua / ws-referral-link example snippets


...
public function actions()
{
    return [
        ...
        'referral' => [
            'class' => '\wscvua\ws_referral_link\actions\ReferralAction',
        ],
        ...
    ];
}
...

...
'modules' => [
    'referral' => [
        'class' => \wscvua\ws_referral_link\Module::className(),
        'adminPermission' => ['admin']
    ],
    ...
],
...

use wscvua\ws_referral_link\widgets\ReferralLink;

ReferralLink::widget([
    'url' => $url,
    'controller' => 'site'
]);