lakm / laravel-comments
Integrate seamless commenting functionality into your Laravel project.
Fund package maintenance!
Lakshan-Madushanka
Installs: 1 986
Dependents: 1
Suggesters: 0
Security: 0
Stars: 251
Watchers: 3
Forks: 9
Open Issues: 2
Requires
- php: ^8.1|^8.2|^8.3
- graham-campbell/security: 11.2
- laravel/framework: ^10.0|^11.0
- livewire/livewire: ^3.4
- spatie/laravel-honeypot: ^4.5
Requires (Dev)
- larastan/larastan: ^2.9
- orchestra/testbench: 8.*
- pestphp/pest: ^2.34
- pestphp/pest-plugin-laravel: ^2.3
- pestphp/pest-plugin-livewire: ^2.1
- dev-main
- 3.0.0-beta
- 2.1.0
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-beta
- v1.x-dev
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-beta
- dev-modern-theme
- dev-dependabot/npm_and_yarn/nanoid-3.3.8
- dev-dependabot/npm_and_yarn/rollup-4.22.4
This package is auto-updated.
Last update: 2024-12-21 12:03:30 UTC
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\Comments\Concerns\Commentable; use LakM\Comments\Contracts\CommentableContract; class Post extends Model implements CommentableContract { use Commentable; }
Implement CommenterContract
and import Commenter
trait in commenter model.
use LakM\Comments\Concerns\Commenter; use LakM\Comments\Contracts\CommenterContract; class User extends Model implements CommenterContract { use Commenter; }
Include styles in your layout.
<html> <head> @commentsStyles </head> </html>
Include scripts in your layout.
<html> <body> @commentsScripts </body> </html>
Include the comments component with the related model.
<x-comments::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-comments:: :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
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 💗!