fawad/laravel-comments

A Laravel package that provides a TALL-stack powered comment system with replies, attachments, and voting.

Maintainers

Package info

github.com/fadi06/comment-system

pkg:composer/fawad/laravel-comments

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.4 2025-08-27 08:33 UTC

This package is auto-updated.

Last update: 2026-03-27 09:40:11 UTC


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:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a Pull Request

------------------------------ Thank you ------------------------------