PHP code example of zarv1k / yii2-params

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

    

zarv1k / yii2-params example snippets


return [
    // ...
    'params' => '@zarv1k/params/config/default.php',
    // ...
];

return [
    // ...
    'params' => [
        'class' => 'zarv1k\params\components\Params',
        'filePath' => '@app/config/params.php'
    ],
    // ...
];

return [
    // ...
    'modules' => [
        // ...
        'params' => [
            'class' => 'zarv1k\params\modules\params\Module'
        ],
        // ...
    ],
];

php composer.phar 

\Yii::$app->params['param_scope.param_code']