定制 sadi01/yii2-more-settings 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

sadi01/yii2-more-settings

最新稳定版本:v1.0.0

Composer 安装命令:

composer require sadi01/yii2-more-settings

包简介

Handle Settings For Yii2 Framework

README 文档

README

Handle settings for Yii 2


For license information check the LICENSE-file.

Installation

1. Download

The preferred way to install this extension is through composer:

composer require --prefer-dist sadi01/yii2-more-settings:"*"

2. Configuration

To use this extension, you have to configure the PostService class in your application configuration:

return [
    //....
    'modules' => [
        'moresettings' => [
            'class' => 'sadi01\moresettings\SettingsModule',
            'rootAlias' => '@webroot',
            'webAlias' => '@web',
        ],
    ]
];

3. Update database schema

The last thing you need to do is updating your database schema by applying the migrations. Make sure that you have properly configured db application component and run the following command:

$ php yii migrate/up --migrationPath=@vendor/sadi01/yii2-more-settings/src/migrations

How To Use

Manage setting categories and settings :

http://yourdomain/moresettings/default/index
http://yourdomain/moresettings/setting-cat/index

Get value of setting:

use sadi01\moresettings\models\SettingValue;

SettingValue::getValue('settingCategory', 'settingName')

Setting widget for change value of setting:

use sadi01\moresettings\widgets\SettingsWidget

<?=
SettingsWidget::widget([
    'model' => $model,
    'categoryName' => 'mainSettings', // name of Setting category
    'settingName' => 'apiBaseUrl' // name of setting
])
?>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2022-12-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固