omatech / editora
v7.1.0
2024-06-07 11:47 UTC
Requires
- dev-master
- v7.1.0
- v7.0.16
- v7.0.15
- v7.0.14
- v7.0.13
- v7.0.12
- v7.0.11
- v7.0.10
- v7.0.9
- v7.0.8
- v7.0.7
- v7.0.6
- v7.0.5
- v7.0.4
- v7.0.3
- v7.0.2
- v7.0.1
- v7.0.0
- v6.2.45
- v6.2.44
- v6.2.43
- v6.2.42
- v6.2.41
- v6.2.40
- v6.2.39
- v6.2.38
- v6.2.37
- v6.2.36
- v6.2.35
- v6.2.34
- v6.2.33
- v6.2.32
- v6.2.31
- v6.2.30
- v6.2.29
- v6.2.28
- v6.2.27
- v6.2.26
- v6.2.25
- v6.2.24
- v6.2.23
- v6.2.22
- v6.2.21
- v6.2.20
- v6.2.19
- v6.2.18
- v6.2.17
- v6.2.16
- v6.2.15
- v6.2.14
- v6.2.13
- v6.2.12
- v6.2.11
- v6.2.10
- v6.2.9
- v6.2.8
- v6.2.7
- v6.2.6
- v6.2.5
- v6.2.4
- v6.2.3
- v6.2.2
- v6.2.1
- v6.2.0
- v6.1.30
- v6.1.29
- v6.1.28
- v6.1.27
- v6.1.26
- v6.1.25
- v6.1.24
- v6.1.23
- v6.1.22
- v6.1.21
- v6.1.20
- v6.1.19
- v6.1.18
- v6.1.17
- 6.1.16
- 6.1.15
- 6.1.14
- 6.1.13
- 6.1.12
- 6.1.11
- 6.1.10
- v6.1.9
- v6.1.8
- v6.1.7
- v6.1.6
- v6.1.5
- v6.1.4
- v6.1.3
- v6.1.2
- v6.1.1
- v6.1
- v6.0.46
- v6.0.45
- v6.0.44
- v6.0.43
- v6.0.42
- v6.0.41
- v6.0.40
- v6.0.39
- v6.0.38
- v6.0.37
- v6.0.36
- v6.0.35
- v6.0.34
- v6.0.33
- v6.0.32
- v6.0.31
- v6.0.30
- v6.0.29
- v6.0.28
- v6.0.27
- v6.0.26
- v6.0.25
- v6.0.24
- v6.0.23
- v6.0.22
- v6.0.21
- v6.0.20
- v6.0.19
- v6.0.18
- v6.0.17
- v6.0.16
- v6.0.15
- v6.0.14
- v6.0.13
- v6.0.12
- v6.0.11
- v6.0.10
- v6
- dev-compatibility-laravel-11
- dev-add_compatibility_to_php8
- dev-laravel-controllers
- dev-new_menu_tabs
This package is auto-updated.
Last update: 2024-09-07 12:25:33 UTC
README
Laravel 设置
创建新的 Laravel 空项目
composer create-project --prefer-dist laravel/laravel editora-test
设置 .env 文件中的数据库连接等信息
在 composer.json 文件中,在文件根目录添加稳定性设置,并更改项目和描述名称,例如
"name": "editora-test",
"description": "Editora Frontend",
"minimum-stability": "dev",
"prefer-stable": true,
执行 composer update
composer update
发布新的供应商,运行
php artisan vendor:publish --provider=Omatech\Editora\Connector\ConnectorServiceProvider
php artisan vendor:publish --provider=Omatech\Editora\EditoraServiceProvider
php artisan vendor:publish --tag=editora-publish
在 routes/web.php 中添加 editora 路由
use Omatech\Editora\Connector\Editora;
Editora::routes();
在 config 文件夹中,有两个用于 editora 设置的文件:editora.php 设置语言和不同的 editora 选项,editoradatabase.php 设置 editora 结构
修改 editoradatabase.php 并运行以应用更改
php artisan editora:create
可选
将所有您的标记资产放入 resources/assets/markup(scss、js、img、fonts 等)
覆盖根目录下 webpack.mix.js 中的 mix.js 调用
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/markup/scss/styles.scss', 'public/css/styles.css')
.copy('resources/assets/markup/js', 'public/js')
.copy('resources/assets/markup/img', 'public/img')
.copy('resources/assets/markup/fonts', 'public/fonts')
.version();
安装并运行 npm
npm install
npm run dev
Laravel 命令
生成器
根据 config/editoradatabase.php 中设置的规则创建 Editora 数据库结构
php artisan editora:create
虚构内容
为 Editora 数据库创建随机内容
php artisan editora:fakecontent
参数
php artisan editora:fakecontent --exclude_classes=1,10,11,12,13
{--num_instances=} {--include_classes=} {--exclude_classes=} {--pictures_theme=} {—debug} {--delete_previous_data}
--help this help!
--num_instances number of instance to create for each class
--include_classes generate only this class_ids, comma separated
--exclude_classes generate all but this class_ids, comma separated
--pictures_theme generate pictures themed with that word, default:cats you can use abstract, animals, business, cats, city, food, nightlife, fashion, people, nature, sports, technics, transport
--debug show all sqls (if not present false)
--delete_previous_data **USE WITH CAUTION**, if set deletes all the previous data before generating the fake data
待定 缺少为某些属性(地图、日期等)添加随机内容。
CreateMVC
为前端创建模型、视图和控制器文件(如果不存在的话)
php artisan editora:createmvc
参数
--include_classes=1,2,3 generate only this class_ids, comma separated
--force_overwrite_views
--force_overwrite_models
--force_overwrite_controllers
--force_overwrite_all
待定 缺少强制创建参数以删除类。
现代化
改进 Editora 数据库的数据库结构,仅适用于旧版 Editora,不适用于新项目。它创建索引,添加了新列(如 batch_id、external_id)并更改使用加密密码
php artisan editora:modernize