PHP code example of gunter1020 / yii2-common
1. Go to this page and download the library: Download gunter1020/yii2-common 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/ */
gunter1020 / yii2-common example snippets
use gunter1020\yii2\common\base\GuSecurity;
$config = [
'components' => [
'security' => [
'class' => GuSecurity::class,
'encryptKey' => 'YOUR_ENCRYPT_KEY',
]
]
]
use gunter1020\yii2\common\behaviors\EncryptBehavior;
public function behaviors()
{
return [
'encryptAttrs' => [
'class' => EncryptBehavior::class,
'attributes' => ['id_number', 'salary_amount'],
],
];
}