Download the PHP package itmosoft/laravel-comments without Composer
On this page you can find all versions of the php package itmosoft/laravel-comments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download itmosoft/laravel-comments
More information about itmosoft/laravel-comments
Files in itmosoft/laravel-comments
Package laravel-comments
Short Description Polymorphic comments and threaded discussions for Laravel Eloquent models.
License MIT
Informations about the package laravel-comments
Laravel Comments
Polymorphic comments and threaded discussions for Laravel Eloquent models.
Requirements
- PHP 8.3+
- Laravel 12 or 13
Installation
Usage
Add the trait to any Eloquent model:
Create a comment or reply:
Edit or delete (only the original author is accepted by the manager):
Query top-level comments and replies:
Metadata is stored as JSON and exposed as a PHP array on the comment model.
Visibility
Supported values are public and internal. Visibility is stored as data; your application
must enforce who can read internal comments. Do not expose internal comments in public APIs.
Configuration
Publish itmosoft-comments.php to configure the table name, maximum thread depth, and allowed
visibility values. The default maximum thread depth is 5 (a root comment has depth 0).
Responsibilities and limitations
- The package checks comment authorship for edit and delete operations.
- Your application must implement authorization for creating comments and reading internal comments.
- This release does not include mentions, notifications, reactions, attachments, moderation queues, spam detection, UI, or automatic model observers.
- Soft-deleting a parent comment leaves replies intact; the parent foreign key is configured to null if a row is physically deleted.
Testing
License
MIT. See LICENSE.
All versions of laravel-comments with dependencies
illuminate/contracts Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0