PHP code example of pavlinter / yii2-adm-params

1. Go to this page and download the library: Download pavlinter/yii2-adm-params 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/ */

    

pavlinter / yii2-adm-params example snippets


'on beforeRequest' => function ($event) {
    $params = \pavlinter\admparams\models\Params::bootstrap();
    Yii::$app->params = \yii\helpers\ArrayHelper::merge(Yii::$app->params, $params);
},
'modules' => [
    ...
    'adm' => [
        ...
        'modules' => [
            'admparams'
        ],
        ...
    ],
    'admparams' => [
        'class' => 'pavlinter\admparams\Module',
    ],
    ...
],

yii migrate --migrationPath=@vendor/pavlinter/yii2-adm-params/admparams/migrations