fawad/laravel-comments
Composer 安装命令:
composer require fawad/laravel-comments
包简介
A Laravel package that provides a TALL-stack powered comment system with replies, attachments, and voting.
README 文档
README
A lightweight yet powerful comment system for Laravel that works seamlessly with any type of post — blog articles, videos, audios, or custom content.
This package allows your users to engage with your content effortlessly, while giving you full flexibility and customization options. 🚀
✨ Features
- 📝 Add comments to any model (posts, videos, audios, or custom entities).
- 🎨 Beautiful, ready-to-use frontend UI out of the box.
- ⚡ Quick installation – just one line of code to show comments.
- 🗂️ Configurable settings – publish the vendor file and tweak it your way.
- 🛠️ Built with Laravel + Livewire, making it dynamic and reactive.
- 🤝 Open for contributions – improve and extend together.
⚙️ Requirements
To use this package, make sure your project meets the following minimum requirements:
- PHP: >= 8.2
- Laravel: >= 11.x
- Livewire: >= 3.x
📦 Installation
Clone the package into your Laravel project:
composer require fawad/laravel-comments
Or install directly from GitHub:
git clone https://github.com/fadi06/comment-system.git
⚙️ Publish Vendor Files
To customize the configuration, publish the vendor files:
php artisan vendor:publish --tag="comment-config"
Next Step:
php artisan vendor:publish --tag="comment-view"
⚙️ Run Migrations
To run migration run the below command
php artisan migrate
Next Step:
npm run build
or add cdn link
<script src="https://cdn.tailwindcss.com"></script>
🚀 Usage
Adding the comment system to your project is super simple.
Just drop this line into your Blade file (e.g., under your blog post):
<livewire:comments :model="$post" />
That’s it! 🎉
Now every post will have its own dynamic comment section.
🔧 Configuration
Once published, you can edit the config file to:
- Change table names
- Customize views
- Adjust behavior according to your needs
💡 Example
Add comments under your blog posts like this:
// Inside your controller $post = Post::findOrFail($id); return view('post.show', compact('post'));
{{-- Inside your Blade --}} <livewire:comments :model="$post" />
Now your users can start commenting on posts instantly.
🤝 Contributing
Contributions are warmly welcome!
If you’d like to add features, fix bugs, or improve documentation:
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/YourFeature) - Open a Pull Request
------------------------------ Thank you ------------------------------
fawad/laravel-comments 适用场景与选型建议
fawad/laravel-comments 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 08 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「comments」 「laravel」 「tailwind」 「livewire」 「alpinejs」 「tall」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fawad/laravel-comments 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fawad/laravel-comments 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fawad/laravel-comments 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Twig extension for Timber which outputs HTML comments before and after the `include` tag
Provides a TailwindUI-based skin for the Winter CMS backend.
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 ...
Asset for Tailwind for YiiFramework v.3.0.
WordPress plugin to force comments to go through the more liberal post HTML filters, rather than the restrictive comment filters.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 30
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-26