lakm/laravel-comments
Composer 安装命令:
composer require lakm/laravel-comments
包简介
Integrate seamless commenting functionality into your Laravel project.
README 文档
README
Documentation | Admin Panel | Overview | Articles | Key Features | Why Commenter | Quick Start | Themes | Demo | Changelog | Testing | Roadmap | Security | License | Sponsor
Everything you need for your commenting system
A Laravel package that brings powerful commenting functionality to your apps 😍
Overview
Commenter is a feature-rich, modern package with an admin panel designed to address all your commenting needs. With this package, you won't need any additional tools for the comment functionality in your Laravel projects.
See the documentation for detailed installation and usage instructions.
<x-comments :model="$post" />
Articles
Key Features
- ❤️ Simple, modern, and user-friendly interfaces.
- 📱 Mobile responsiveness.
- ⛯ Dark mode support.
- 📝 WYSIWYG editor.
- 📔 Syntax highlighting.
- 🔒 Robust security features.
- 🔑 Effective spam prevention.
- 🤩 Reaction options.
- 📞 Support for threaded replies.
- 👤 User mention functionality.
- 👥 Display list of users who reacted (auth mode only).
- 🔢 Pagination.
- 👮♂️Support for both authentication mode and guest mode (mutually exclusive).
- 🔍 Advanced filtering and sorting options.
- 🥰 Responsive design using a combination of Livewire and Alpine.js.
- 🚀 Optimized performance. And much more.
Why Commenter
The commenting feature is a common requirement for most websites. Allowing users to comment enables interaction and enhances the user experience. While Laravel offers a wealth of packages to meet various project needs, there are limited options when it comes to commenting features.
Here are some drawbacks of existing commenting packages:
- Outdated: Uses outdated technologies and is not actively maintained.
- Lack of Features: Missing many essential features.
- No Admin Panel: Requires additional time to implement an admin panel independently.
- Bad Design: Interfaces are not user-friendly.
- Not Mobile Responsive: Not optimized for mobile devices.
- Performance Issues: May cause performance slowdowns.
- Lack of Configurability: Limited options for customization and configuration.
Due to these issues, most companies tend to opt for commercial packages or plugins. However, spending extra money on commercial packages reduces the company's overall profit. This package is developed to address all these shortcomings.
As a full-stack developer, I have personally encountered these issues. That's why I developed this package—not only for my own projects but also to benefit other developers.
Quick Start
Installation
composer require lakm/laravel-comments -W php artisan commenter:install
Usage
Implement CommentableContract and import Commentable trait in commentable model.
use LakM\Commenter\Concerns\Commentable; use LakM\Commenter\Contracts\CommentableContract; class Post extends Model implements CommentableContract { use Commentable; }
Implement CommenterContract and import Commenter trait in commenter model.
use LakM\Commenter\Concerns\Commenter; use LakM\Commenter\Contracts\CommenterContract; class User extends Model implements CommenterContract { use Commenter; }
Include styles in your layout.
<html> <head> @commenterStyles </head> </html>
Include scripts in your layout.
<html> <body> @commenterScripts </body> </html>
Include the comments component with the related model.
<x-commenter::index :model="$post" />
Warning
You can omit the index part but make sure to include the double colon. Otherwise Laravel will search for the component in project instead of package.
<x-commenter:: :model="$post" />
Themes
You can change theme to your prefferred one. Consult documentation here for more info.
Demo
Project
https://github.com/Lakshan-Madushanka/laravel-comments-demo
Mini video
Full Video
Note
This mini demo video provides a basic overview of Commenter. The full scope and features of Commenter are much more extensive. A comprehensive video will be published with the stable release.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
./vendor/bin/pest
Roadmap
| Feature | Status | Version |
|---|---|---|
| Comment/Reply Report | TBI | - |
| Guest mode email verification | ✅ | 2.0.0 |
| Dark Mode Support | ✅ | 2.0.0 |
| Pin Comments | TBI | |
| Nested Replies | ✅ | 3.0.0 |
Security
Please see here for our security policy.
License
The MIT License (MIT). Please see License File for more information.
Sponsor this project
You might think we're biased, but this is genuinely one of the best commenting systems available for paid or free (we doubt there’s a paid solution that’s as tailored to your needs as this one). We're dedicated to continuously improving this package and meeting your requirements. Isn’t it reassuring to have a well-tested, feature-rich commenting system available for free for your Laravel projects?
We truly appreciate any sponsorship you offer. Your contribution is a direct investment in your future as well, with every penny supporting the growth of this project and other open-source initiatives.
If you find value in this project, please consider supporting it by visiting the sponsor page: https://github.com/sponsors/Lakshan-Madushanka. Your support means a lot 💗!
Intertwined packages
We often find that the majority of packages using Commenter also require a review and rating system. With our TrueReviewer package, you can seamlessly integrate a complete review and rating solution into your project without breaking a sweat.
lakm/laravel-comments 适用场景与选型建议
lakm/laravel-comments 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.64k 次下载、GitHub Stars 达 405, 最近一次更新时间为 2024 年 05 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「comments」 「laravel」 「livewire」 「alpine.js」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lakm/laravel-comments 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lakm/laravel-comments 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lakm/laravel-comments 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Twig extension for Timber which outputs HTML comments before and after the `include` tag
Livewire starter kit for Lunar e-commerce.
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 ...
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
Livewire component that provides drawers (slide overs) that support multiple children while maintaining state.
统计信息
- 总下载量: 14.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 406
- 点击次数: 19
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-31