PHP code example of shoxabbos / yii2-config

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

    

shoxabbos / yii2-config example snippets


./yii migrate  --migrationPath="@shoxabbos/config"

'modules' => [
    'admin' => [
        'class' => 'app\modules\admin\Module',
        'controllerMap' => [
            'config' => 'shoxabbos\config\controllers\ConfigController'
        ]
    ],
]

/admin/config/create
/admin/config/update
/admin/config/view
/admin/config/index

'components' => [
    'config' => [
        'class' => 'shoxabbos\config\Config',
    ],
]

\Yii::$app->config->get('key');

\Yii::$app->config->get('key', 'propertyName');

\Yii::$app->config->get('key', 'propertyName', 3600 * 24);

\Yii::$app->config->set('key', 'varchar 255', 'text');

php composer.phar