ametsuramet / suprb-cms-builder
Laravel 5.7+ 的 CMS Builder
v1.0
2018-10-24 04:25 UTC
Requires
- jeroennoten/laravel-adminlte: ^1.24
- laracasts/flash: ^3.0
- spatie/laravel-permission: ^2.21
- spatie/laravel-sluggable: ^2.1
- unisharp/laravel-filemanager: ~1.8
This package is auto-updated.
Last update: 2024-09-19 12:42:02 UTC
README
安装
安装非常简单! 使用 composer 安装
composer require "ametsuramet/suprb-cms-builder:dev-master"
发布 CMS JSON 文件
php artisan vendor:publish --tag=cmsbuilder-json --force
编辑 JSON 文件
编辑 cmsbuilder.json
[
{
"name": "Book",
"softdelete": false,
"primaryKey": null,
"resource": true,
"relations": [
{"type": "belongs_to", "target":"Category"}
],
"schema": [
{
"field": "title",
"type": "string",
"nullable": true,
"searchable": true,
"default": "NULL",
"form_type": "text",
"options": []
},
{
"field": "description",
"type": "text",
"nullable": true,
"searchable": true,
"default": "NULL",
"form_type": "textarea",
"options": []
},
{
"field": "picture",
"type": "string",
"nullable": true,
"searchable": false,
"default": "NULL",
"form_type": "file",
"options": []
},
{
"field": "author_id",
"type": "integer:unsigned",
"nullable": true,
"searchable": false,
"default": "NULL",
"form_type": "select",
"options": [
{"value": 1, "label": "user 1"},
{"value": 2, "label": "user 2"}
]
},
{
"field": "category_id",
"type": "integer:unsigned",
"nullable": true,
"searchable": false,
"default": "NULL",
"form_type": "select",
"options": []
},
{
"field": "publish",
"type": "boolean",
"nullable": true,
"searchable": false,
"default": "true",
"form_type": "radio",
"options": [
{"value": 1, "label": "option 1"},
{"value": 2, "label": "option 2"}
]
}
]
}
]
使用
生成 CMS
php artisan cms:generate
待办事项
- 迁移
- 模型
- 视图
- 控制器
- 路由
- 请求
- 权限
- JWT 支持
- Swagger 支持
- Faker
- Socialite
- 更新功能