{"id":20144174,"url":"https://github.com/quansitech/qscmf-access-generation","last_synced_at":"2026-04-15T16:33:19.434Z","repository":{"id":62531964,"uuid":"267489462","full_name":"quansitech/qscmf-access-generation","owner":"quansitech","description":"新增node节点值，以及access权限点控制","archived":false,"fork":false,"pushed_at":"2022-11-14T15:32:08.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T23:44:01.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quansitech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-28T04:03:04.000Z","updated_at":"2022-11-14T11:22:19.000Z","dependencies_parsed_at":"2023-01-22T04:05:24.890Z","dependency_job_id":null,"html_url":"https://github.com/quansitech/qscmf-access-generation","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/quansitech/qscmf-access-generation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-access-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-access-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-access-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-access-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quansitech","download_url":"https://codeload.github.com/quansitech/qscmf-access-generation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-access-generation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31849814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T22:09:03.982Z","updated_at":"2026-04-15T16:33:19.418Z","avatar_url":"https://github.com/quansitech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# quansitech/qscmf-access-generation\n![Travis (.com)](https://img.shields.io/travis/com/tiderjian/lara-for-tp.svg?style=flat-square)\n![style ci](https://img.shields.io/travis/com/tiderjian/lara-for-tp.svg?style=flat-square)\n![download](https://img.shields.io/packagist/dt/tiderjian/lara-for-tp.svg?style=flat-square)\n![lincense](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)\n[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE)\n![Pull request welcome](https://img.shields.io/badge/pr-welcome-green.svg?style=flat-square)\n\n## 介绍\n由于手动添加权限点比较繁琐，并且容易出错，所有寄希望于脚本来简化操作。该功能主要实现权限点添加，额外实现qs_node节点添加\n   \n\n## 安装\n安装[qs_cmf](https://github.com/tiderjian/qs_cmf)\n\ncomposer安装\n```\ncomposer require quansitech/qscmf-access-generation\n```\n\n\n## 使用\n目前支持的laravel功能有 migrate、make:model、make:seeder、db:seed，具体用法请自行查阅laravel手册。\n\nmigrate文件必须存放在lara/database/migrations下,在lara目录下的.env文件中配置要访问的数据库,然后在项目根目录执行php artisan migrate即可完成数据库的迁移，相关的migrate命令可查看[laravel文档](https://learnku.com/docs/laravel/5.8/migrations/3928)。\n\n测试脚本必须存放到lara/tests路径下，继承该目录下的TestCase类。配置phpunit.xml文件，设置可用于测试使用的数据库及web服务地址端口。最后运行phpunit，执行测试脚本。关于laravel dusk的使用请查阅[laravel文档](https://learnku.com/docs/laravel/5.8/dusk/3943)。\n\n## 文档\n### Node\n用于生成qs_node节点数据，并且已存在的节点程序不会再创建\n#### 使用\n请参考lara\\database\\migrations\\2020_05_29_090217_create_test_node_data.php文件\n```\n\u003c?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateTestNodeData extends Migration\n{\n    protected $nodeData = [\n        'ControllerName1'=\u003e[\n            'testAction1' =\u003e '方法1',\n            'testAction2' =\u003e '方法2',\n            'testAction3' =\u003e '方法3',\n        ],\n        'ControllerName2'=\u003e[\n            'testAction1' =\u003e '方法1',\n            'testAction2' =\u003e '方法2',\n            'testAction3' =\u003e '方法3',\n        ],\n    ];\n    \n    public function up()\n    {\n        \\quansitech\\dataGenerate\\Node::up($this-\u003enodeData);\n    }\n    public function down()\n    {\n        \\quansitech\\dataGenerate\\Node::down($this-\u003enodeData);\n    }\n}\n\n``` \n#### Node:up、Node:down方法参数说明\n\n##### 参数 $nodeData 必填\n\n$nodeData参数是一个二维数组格式如下：\n ```  \n$nodeData = [\n        '控制器名'=\u003e[\n            '方法名' =\u003e '方法中文名称',\n            ......\n        ],\n        ......\n    ];\n ```\n##### 参数 $nodeNameOrId 选填\n\n说明：模块名：默认为admin，可选填qs_node中level=1的id或name的值\n如默认的amdin模块id=1\n  \n\n### Access\n用于生成qs_access权限点数据\n```\n\u003c?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateTestAccessData extends Migration\n{\n    protected $nodeData = [\n        'ControllerName1'=\u003e[\n            'testAction1' =\u003e '方法1',\n            'testAction2' =\u003e '方法2',\n            'testAction3' =\u003e '方法3',\n        ],\n        'ControllerName2'=\u003e[\n            'testAction1' =\u003e '方法1',\n            'testAction2' =\u003e '方法2',\n            'testAction3' =\u003e '方法3',\n        ],\n        'NewAccess'=\u003e[\n            'access1' =\u003e '方法1',\n            'access2' =\u003e '方法2',\n            'access3' =\u003e '方法3',\n        ],\n    ];\n\n    public function up()\n    {\n        \\quansitech\\dataGenerate\\Access::up($this-\u003enodeData, 1);\n    }\n    public function down()\n    {\n        \\quansitech\\dataGenerate\\Access::down($this-\u003enodeData, 1);\n    }\n}\n```\n#### Access:up、Access:down方法参数说明\n\n##### 参数 $data必填\n \n$nodeData参数是一个二维数组格式如下：\n ``` \n$nodeData = [\n        '控制器名'=\u003e[\n            '方法名' =\u003e '方法中文名称',\n            ......\n        ],\n        ......\n    ];  \n``` \n##### 参数 $role_id 必填\n\n说明：用户组id值\n\n##### 参数 $firstNode  选填 \n\n说明：模块名：默认为admin，可选填qs_node中level=1的id或name的值如默认的amdin模块id=1","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fqscmf-access-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquansitech%2Fqscmf-access-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fqscmf-access-generation/lists"}