reg2005/oc-jsonable 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

reg2005/oc-jsonable

Composer 安装命令:

composer require reg2005/oc-jsonable

包简介

This widget the alternative to a widget 'Repeater' allows to write data to jsonable field also as well as 'Repeater', but does not give the chance to do repetitions of fields. I.e. the array will look so:

关键字:

README 文档

README

This widget the alternative to a widget Repeater allows to write data to jsonable field also as well as "Repeater".

alt text

How to use:

0.1 Create a json or jsonb or text field in a database.
0.2 Add in model:
public $jsonable = ['config'];
1. Just add into your plugin or project composer.json:
{
    "require": {
        "reg2005/oc-jsonable": "1.0.*"
    }
}
2. Go to your october project directory use terminal, and run command:

composer update

3. Add to your Plugin.php this:
    public function registerFormWidgets()
    {
        return [
            'reg2005\Widgets\Jsonable' => [
                'label' => 'jsonable',
                'code'  => 'jsonable'
            ]
        ];
    }

ADD to your fields.yaml something like:

fields:
    config[customization]:
            label: 'extra'
            type: jsonable
            form:
                fields:
                    form_color:
                        label: 'Color'
                        oc.commentPosition: ''
                        span: left
                        type: colorpicker
                    background:
                        label: 'Background'
                        oc.commentPosition: ''
                        mode: image
                        useCaption: 0
                        thumbOptions:
                            mode: crop
                            extension: jpg
                        span: left
                        type: fileupload
                    time[mon]:
                        label: Monday
                        type: jsonable
                        span: left
                        form:
                            fields:
                                from:
                                    label: 'From'
                                    oc.commentPosition: ''
                                    span: left
                                    default: '09:00'
                                    type: datepicker
                                    format: 'H:i'
                                    mode: time
                                to:
                                    label: 'To'
                                    oc.commentPosition: ''
                                    span: right
                                    default: '18:00'
                                    format: 'H:i'
                                    type: datepicker
                                    mode: time
                    time[tue]:
                        label: Tuesday
                        type: jsonable
                        span: left
                        form:
                            fields:
                                from:
                                    label: 'From'
                                    oc.commentPosition: ''
                                    span: left
                                    default: '09:00'
                                    type: datepicker
                                    mode: time
                                to:
                                    label: 'To'
                                    oc.commentPosition: ''
                                    span: right
                                    default: '18:00'
                                    type: datepicker
                                    mode: time

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固