uccello / comment
将评论小部件添加到 Uccello 实体。
v1.0.0
2021-02-09 15:49 UTC
Requires
- uccello/uccello: 1.*
This package is auto-updated.
Last update: 2024-09-25 01:03:43 UTC
README
文档设计器是一个允许添加与任何 Uccello 实体关联的评论小部件的 Laravel/Ucello 包。
功能
- 与任何 Uccello 实体关联的评论
- 用户创建/编辑/删除评论
- 回复任何一级评论
安装
包
composer require uccello/comment
发布
安装后执行以下操作
php artisan vendor:publish --provider="Uccello\Comment\Providers\AppServiceProvider"
使用
要添加评论小部件,添加一个执行以下行的迁移
$widget = Widget::where('label', 'widget.comments')->first(); $module->widgets()->attach($widget->id, ['data' => json_encode(['title' => 'Comments']), 'sequence' => 0]);
请注意,填充数据字段不是必需的。
配置
您可以将以下可选设置添加到您的 uccello.php 配置文件中
'comment' => [ 'max_height' => 450, 'show_child' => true, 'can_edit_parent' => true, 'can_delete_parent' => false, 'order_desc' => true, ]