Download the PHP package ssntpl/laravel-comments without Composer

On this page you can find all versions of the php package ssntpl/laravel-comments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-comments

laravel-comments

This is a simple package to associate comments with your eloquent model in laravel. This package is providing functionality for adding, retrieving, editing, and deleting comments along with its associated files if any on various entities:

Installation

You can install the package via composer:

Run the migrations with:

Optionally, You can publish and run the migrations with:

Publish the config to customise behaviour (user model, edit history, mention pattern, etc.):

Apps that already own a comments table (and manage the schema themselves) can set comments.auto_load_migrations to false so the package does not register its own migrations.

Usage

Add the HasComments trait to your model.

Add new comment to the model.

Accessing the comment model.

Threading (replies)

A comment can reply to another via reply_to_comment_id:

Reactions

One reaction per user per comment (re-reacting changes it):

Edit history (opt-in)

Set comments.changelog to true to snapshot each edit. On every change to body, the previous body is stored in comment_changelogs, so the changelog table holds all prior versions and the model holds the current one — the full history is reconstructable.

Mentions

The package parses @handles out of the body; resolving them to users and delivering notifications is your app's job (typically in a listener on the events below).

The pattern is configurable via comments.mentions.pattern.

Events

The package fires framework-agnostic events so your app can send notifications, broadcast, or record activity without the package knowing about any of that:

Event When
CommentCreated a comment is created
CommentUpdated a comment's body is edited (carries previousBody)
CommentDeleted a comment is deleted
ReactionAdded a user reacts (or changes their reaction)
ReactionRemoved a user removes their reaction

Overriding models

Point comments.models.* at your own subclasses to add behaviour. Custom classes must extend the package base (Comment / CommentReaction / CommentChangelog).

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-comments with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ssntpl/laravel-files Version ^0.1.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ssntpl/laravel-comments contains the following files

Loading the files please wait ...