happytodev/blogr-comments
Composer 安装命令:
composer require happytodev/blogr-comments
包简介
Comment system for Blogr CMS — threaded comments, moderation, voting, anti-spam, and notifications
关键字:
README 文档
README
A full-featured comment system for Blogr CMS — threaded comments, moderation, voting, anti-spam, email notifications, and a complete Filament admin interface.
Features
🔧 Core
- Threaded comments — Nested replies with configurable depth (1–10 levels) and dedicated partials for each level
- Markdown formatting — Bold, italic, code blocks (with syntax highlighting via
scrivo/highlight.php), inline code, links, H2 - Live preview — See formatted content before posting
- Character counter — Configurable max length (default 5000) with real-time countdown
- Toolbar — Bold, italic, H2, link, code block, preview buttons (safe Markdown subset)
🛡️ Moderation & Anti-spam
- 3 moderation modes — Pre-moderation (all pending), post-moderation (auto-publish), trust system (auto-trust after N approved comments)
- Multi-layer anti-spam — Cloudflare Turnstile (free, invisible), StopForumSpam API (free), Akismet API (paid, optional), local keyword/link filters
- Rate limiting — Per-IP throttling for comments (configurable per hour) and votes (per minute) via dedicated middleware
- Admin moderation — Approve, reject, mark as spam, or delete individually or in bulk
- Email-based quick moderation — Signed URL approve/reject links in notification emails
📬 Notifications
- New comment alert — Notify site owner on every new comment (or daily digest or weekly digest)
- Reply notification — Possibility to auto-notify parent commenter when someone replies, with opt-out link
- Comment subscriptions — Auto-subscribe on comment for reply notifications
- Daily digest — Configurable email digest of pending comments
🗳️ Voting
- Up/down voting — IP + User-Agent based anti-doublon protection
- Denormalized score —
vote_scorecolumn on comments for fast sorting - Sort options — Newest, oldest, best (by score)
⚙️ Filament Admin
- Comment Resource — Full list/view with status filters, visible/invisible toggle
- Dashboard widget — Pending comments count with quick link to moderation list
- Settings page — All configuration UI (moderation, notifications, anti-spam, rate limits, nesting depth, display options)
🌍 Frontend Display
- Syntax highlighting — Server-side code highlighting with language badge, dark mode support
- Per-comment permalink — 🔗 button copies sharable URL with
#comment-{id}anchor - Smart anchor scrolling — Dynamic scroll offset accounts for fixed/sticky navigation and mobile viewport
- Comment count on articles — Shows count in card date line and article metadata (configurable)
- Gravatar support — Automatic avatars via email MD5 hash
- Multilingual — Complete EN, FR, ES, DE translations for frontend, admin, and email templates
🔌 Extension Points
- BlogrExtension interface — Registers as
blogr-commentsextension, respects enable/disable state - FilamentPlugin — Auto-registers resource, settings page, and widget in the panel
Requirements
- PHP ^8.3
- Blogr ^1.3
- Laravel ^12.0
- Filament ^4.0
Installation
composer require happytodev/blogr-comments
Run the migrations:
php artisan migrate
Configuration
Publish the config file:
php artisan vendor:publish --tag=blogr-comments-config
Anti-spam (Turnstile)
Get your free Turnstile keys from Cloudflare Turnstile and add to your .env:
TURNSTILE_SITE_KEY=your_site_key TURNSTILE_SECRET_KEY=your_secret_key
Anti-spam (Akismet — optional)
AKISMET_API_KEY=your_akismet_key
Usage
Frontend
Comments automatically appear at the bottom of each blog post. No additional setup needed.
Admin — Moderation
Navigate to Comments in your Filament admin sidebar to:
- View all comments sorted by status
- Filter by status (pending, approved, rejected, spam)
- Approve, reject, or mark as spam (individual or bulk)
- View comment details with full metadata
Admin — Settings
Go to Comments → Settings to configure:
- Moderation mode (pre/post/trust)
- Email notifications (owner + replies + digest)
- Anti-spam providers
- Rate limits
- Nesting depth
- Display options (comment count on articles)
Testing
vendor/bin/pest
Changelog
Please see CHANGELOG for more information.
License
The MIT License (MIT). Please see LICENSE for more information.
happytodev/blogr-comments 适用场景与选型建议
happytodev/blogr-comments 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 06 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「blog」 「comments」 「filamentphp」 「blogr」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 happytodev/blogr-comments 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 happytodev/blogr-comments 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 happytodev/blogr-comments 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Twig extension for Timber which outputs HTML comments before and after the `include` tag
Laravel package for opinionated blog implementation
Laravel comment system
Comments system for your Laravel application. Features: can be used to comment on any model, HTML filter customization (HTMLPurifier), API, comment rating, replies, events, auth rules ...
A Filament plugin that integrates tabler icons, allowing you to use them seamlessly across Filament forms, tables, actions, and more.
jitone-ai is a powerful FilamentPHP plugin that integrates AI-powered features directly into your Filament forms.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-11