定制 vigstudio/livewire-comments 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vigstudio/livewire-comments

Composer 安装命令:

composer require vigstudio/livewire-comments

包简介

Livewire comments packages use backend by vgcomments

README 文档

README

Latest Version on Packagist Total Downloads

Livewire Comments Package

Features

  • Add comments to any model
  • Multiple comment systems on the same page
  • Multiple auth guards
  • Image and File upload support
  • Drag and drop, copy and paste upload files support
  • reCaptcha v3 support
  • Emoji support
  • Markdown support
  • NSFW image upload check support

Pending Features

  • Allow guest to comment
  • Admin panel
  • Mention user with @
  • Emoji Suggestion Popup
  • Delete Report comment
  • Ratting system
  • Toolbar for comment
  • Comment history
  • Show Nested comments
  • Unit test

Packages

Introduction

Package use Macroable trait to add comments to any model. It uses Livewire and AlpineJs to create a comment system with a lot of features.

Package support multiple comment systems on the same page.

Package support multiple auth guards.

Prerequisites

Install Livewire Comments Package

In your terminal run:

composer require vigstudio/livewire-comments

Publish the assets files with:

php artisan vendor:publish --tag=vgcomment-assets-livewire

You can publish the config with:

php artisan vendor:publish --tag=vgcomment-config

Edit prefix route in config/vgcomment.php file.

    /*
    |--------------------------------------------------------------------------
    | Route Prefix
    |--------------------------------------------------------------------------
    |
    | This is the URI path where VgComment will be accessible from. Feel free to
    | change this path to anything you like.
    |
    */
    'prefix' => 'vgcomment',

Edit connection name in config/vgcomment.php file.

    /*
    |--------------------------------------------------------------------------
    | Database Connection
    |--------------------------------------------------------------------------
    |
    | Here you may specify which of the database connections below you wish
    | to use as your default connection for all of your database work.
    |
    */
    'connection' => env('DB_CONNECTION', 'mysql'),

Edit table names in config/vgcomment.php file.

    /*
    |--------------------------------------------------------------------------
    | Name of Tables in Database
    |--------------------------------------------------------------------------
    |
    | This is the name of the table that will be created by the migration and
    | used by the Comment model shipped with this package.
    |
    | "comments"    : Comments Table
    | "files"       : Files Attachment Table
    | "reactions"   : Reactions Table
    | "reports"     : Reports Table
    | "settings"    : Settings Table
    |
    */
    'table' => [
        'comments' => 'vgcomments',
        'files' => 'vgcomment_files',
        'reactions' => 'vgcomment_reactions',
        'reports' => 'vgcomment_reports',
        'settings' => 'vgcomment_settings',
    ],

Config Column or Attribute User Model in config/vgcomment.php file.

        /*
    |--------------------------------------------------------------------------
    | Column of User Table for get Data
    |--------------------------------------------------------------------------
    |
    | This is the setting for column of user table for get data.
    | "user_column_name"  : Column name for get name user
    | "user_column_email" : Column name for get email user
    | "user_column_url"   : Column name for get url user
    |
    */
    'user_column_name' => 'name',
    'user_column_email' => 'email',
    'user_column_url' => 'url',
    'user_column_avatar_url' => 'avatar_url',

Set moderation user in config/vgcomment.php file.

        /*
    |--------------------------------------------------------------------------
    | Users Manager Comments
    |--------------------------------------------------------------------------
    |
    | This is the setting for users manager comments.
    | 'guard' => [user_id]
    |
    | Example:
    | 'web' => [1, 2, 3]
    | 'api' => [1, 2, 3]
    |
    */
    'moderation_users' => [
        'web' => [1],
    ],

Run the migrate command to create the necessary tables: Before running the migrate command, you can edit the config/vgcomment.php file to change the table names.

php artisan migrate

Additionally you may want to clear the config, cache, etc:

php artisan optimize:clear

"Buy Me A Coffee"

"Donate Me!"

vigstudio/livewire-comments 适用场景与选型建议

vigstudio/livewire-comments 是一款 基于 CSS 开发的 Composer 扩展包,目前已累计 107 次下载、GitHub Stars 达 14, 最近一次更新时间为 2022 年 12 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「comments」 「laravel-comments」 「livewire」 「vigstudio」 「livewire-comments」 「comments-system」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 vigstudio/livewire-comments 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 vigstudio/livewire-comments 我们能提供哪些服务?
定制开发 / 二次开发

基于 vigstudio/livewire-comments 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 107
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 19
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 1
  • Forks: 3
  • 开发语言: CSS

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-12