cradlephp/cradle-system
Composer 安装命令:
composer require cradlephp/cradle-system
包简介
Schema, Relations, Object events and controllers for Cradle
关键字:
README 文档
README
Schema, Model and Relation manager.
Install
If you already installed Cradle, you may not need to install this because it should be already included.
composer require cradlephp/cradle-system
$ bin/cradle cradlephp/cradle-system install
Schema
Schemas are similar to database tables, but with more definition. With schemas you can define field types, validation, output formats and indexing capabilities like searchable, filterable and sortable. Schemas are designed to be very flexible and explicit.
Schema Routes
The following routes are available in the admin.
GET /admin/system/schema/search- Schema search pageGET /admin/system/schema/create- Schema create formGET /admin/system/schema/update/:name- Schema update formPOST /admin/system/schema/search- Bulk action processorPOST /admin/system/schema/create- Creates a schemaPOST /admin/system/schema/update/:name- Updates a schemaGET /admin/system/schema/remove/:name- Removes a SchemaGET /admin/system/schema/restore/:name- Restores a Schema
Schema Events
system-schema-createsystem-schema-detailsystem-schema-removesystem-schema-restoresystem-schema-update
Relation
A relation describes the link between 2 objects. Relations can be described by the following. Each relation type will have different sets of UI in the admin.
- 1:0 - one-to-one optionally
- 1:1 - one-to-one required
- 1:N - one-to-many
- N:N - many-to-many
Relation Routes
The following routes are available in the admin.
GET /admin/system/object/:schema1/:id/search/:schema2- Relational Search PageGET /admin/system/object/:schema1/:id/create/:schema2- Relational Create FormGET /admin/system/object/:schema1/:id/link/:schema2- Relational Link FormPOST /admin/system/object/:schema1/:id/search/:schema2- Bulk action processorPOST /admin/system/object/:schema1/:id/create/:schema2- Creates an object and linksPOST /admin/system/object/:schema1/:id/link/:schema2- Links an objectGET /admin/system/object/:schema1/:id1/link/:schema2/:id2- Links an objectGET /admin/system/object/:schema1/:id1/unlink/:schema2/:id2- Unlinks an objectGET /admin/system/object/:schema1/:id/export/:schema2/:type- Exports object relationsGET /admin/system/object/:schema/:id/import/:schema2- Imports object relations
The following routes are available in the front end.
GET /system/object/:schema1/:id/search/:schema2- Relational Search PageGET /system/object/:schema1/:id/create/:schema2- Relational Create FormGET /system/object/:schema1/:id/link/:schema2- Relational Link FormPOST /system/object/:schema1/:id/search/:schema2- Bulk action processorPOST /system/object/:schema1/:id/create/:schema2- Creates an object and linksPOST /system/object/:schema1/:id/link/:schema2- Links an objectGET /system/object/:schema1/:id1/link/:schema2/:id2- Links an objectGET /system/object/:schema1/:id1/unlink/:schema2/:id2- Unlinks an objectGET /system/object/:schema1/:id/export/:schema2/:type- Exports object relationsGET /system/object/:schema/:id/import/:schema2- Imports object relations
Relation Events
system-relation-linksystem-relation-unlinksystem-relation-unlinkall
Object
Objects are similar to database table rows but its functionality is mapped by the schema.
Object Routes
The following routes are available in the admin.
GET /admin/system/object/:schema/search- Object search pageGET /admin/system/object/:schema/create- Object create formGET /admin/system/object/:schema/update/:id- Object update formPOST /admin/system/object/:schema/create- Creates an objectPOST /admin/system/object/:schema/update/:id- Updates an objectGET /admin/system/object/:schema/remove/:id- Removes an objectGET /admin/system/object/:schema/restore/:id- Restores an objectPOST /admin/system/object/:schema/import- Imports objects via JSONGET /admin/system/object/:schema/export/:type- Exports object to a given file type
The following routes are available in the front end.
GET /system/object/:schema/search- Object search pageGET /system/object/:schema/create- Object create formGET /system/object/:schema/update/:id- Object update formPOST /system/object/:schema/create- Creates an objectPOST /system/object/:schema/update/:id- Updates an objectGET /system/object/:schema/remove/:id- Removes an objectGET /system/object/:schema/restore/:id- Restores an objectPOST /system/object/:schema/import- Imports objects via JSONGET /system/object/:schema/export/:type- Exports object to a given file type
Object Events
system-object-createsystem-object-detailsystem-object-removesystem-object-restoresystem-object-update
Contributing to Cradle PHP
Thank you for considering to contribute to Cradle PHP.
Please DO NOT create issues in this repository. The official issue tracker is located @ https://github.com/CradlePHP/cradle/issues . Any issues created here will most likely be ignored.
Please be aware that master branch contains all edge releases of the current version. Please check the version you are working with and find the corresponding branch. For example v1.1.1 can be in the 1.1 branch.
Bug fixes will be reviewed as soon as possible. Minor features will also be considered, but give me time to review it and get back to you. Major features will only be considered on the master branch.
- Fork the Repository.
- Fire up your local terminal and switch to the version you would like to contribute to.
- Make your changes.
- Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")
Making pull requests
- Please ensure to run phpunit and phpcs before making a pull request.
- Push your code to your remote forked version.
- Go back to your forked version on GitHub and submit a pull request.
- All pull requests will be passed to Travis CI to be tested. Also note that Coveralls is also used to analyze the coverage of your contribution.
cradlephp/cradle-system 适用场景与选型建议
cradlephp/cradle-system 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.7k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 03 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cradle」 「cradlephp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cradlephp/cradle-system 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cradlephp/cradle-system 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cradlephp/cradle-system 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Auth Schema for CradlePHP
Role Schema for CradlePHP
Cradle PHP Developer Tools
History Schema for CradlePHP
Profile Schema for CradlePHP
Admin UI for Cradle PHP
统计信息
- 总下载量: 1.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 12
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-17