dev-master
9999999-devYii2 config
MIT
The Requires
by shoxabbos
extension yii2
1.0.0
1.0.0.0Yii2 config
MIT
The Requires
by shoxabbos
extension yii2
Yii2 config
Yii2 simple config, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist shoxabbos/yii2-config "*"
or add, (*4)
"shoxabbos/yii2-config": "*"
to the require section of your composer.json
file., (*5)
, (*6)
Once the extension is installed, simply use it in your code by :, (*7)
./yii migrate --migrationPath="@shoxabbos/config"
For example: adding settings pages to admin module, (*8)
'modules' => [ 'admin' => [ 'class' => 'app\modules\admin\Module', 'controllerMap' => [ 'config' => 'shoxabbos\config\controllers\ConfigController' ] ], ]
After that, you can open the pages as:, (*9)
/admin/config/create /admin/config/update /admin/config/view /admin/config/index
Register the package as a component, (*10)
'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');
Yii2 config
MIT
extension yii2
Yii2 config
MIT
extension yii2