承接 zarv1k/yii2-params 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zarv1k/yii2-params

最新稳定版本:0.1.1

Composer 安装命令:

composer require zarv1k/yii2-params

包简介

Yii2 Advanced params

关键字:

README 文档

README

This extension provides the advanced params for Yii 2 applications. (Warning: this extension is under development, unstable and not for production use)

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist zarv1k/yii2-params "*"

or add

"zarv1k/yii2-params": "*"

to the require section of your composer.json file.

Run migrations to create params table in DB:

yii migrate --migrationPath=@zarv1k/params/migrations

Once the extension is installed, simply modify your application configuration as follows:

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

Or use your custom params component configuration as follows:

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

To manage application params on your web site you can turn on the params module:

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

Then you can then access params module through the following URL:

http://localhost/path/to/index.php?r=params

or if you have enabled pretty URLs, you may use the following URL:

http://localhost/path/to/index.php/params

Usage

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

统计信息

  • 总下载量: 43
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2015-01-11