Download the PHP package rizwan3d/comment-system without Composer

On this page you can find all versions of the php package rizwan3d/comment-system. 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 comment-system

Rizwan3d/CommentSystem

This Laravel package provides a robust and flexible comment system for your applications. It enables you to seamlessly integrate commenting functionality into your models, allowing users to engage in discussions and leave feedback.

Installation

  1. Add the package to your project's composer.json file:

  2. Run Composer to install the package:

  3. Register the service provider:

    Open your config/app.php file and add the following line to the providers array:

Usage

  1. Apply the Commentable trait to your models:

    The Commentable trait provides methods for adding and retrieving comments associated with your models. Add the following line at the top of your model class:

  2. Adding Comments:

    Use the addComment method to add a new comment to your model instance:

    • Replace $content with the actual comment text.
  3. Retrieving Comments:

    The comments method returns a collection of comments associated with your model instance:

    This method automatically retrieves comments with nested replies using eager loading.

  4. Model Relationships (Optional):

    The package supports defining relationships between comments. You can add the parent_id field to your Comment model migration and define the following relationships:

    • parent: This belongs-to relationship allows you to link comments to their parent comment.
    • comments: This has-many relationship retrieves child comments of a specific comment.

Example Usage

Features

View Example

comment.blade.php

Contributing

We welcome contributions to this package! Please refer to the contribution guidelines for more information.

License

This package is licensed under the MIT License. See the LICENSE file for details.

Additional Notes


All versions of comment-system with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
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 rizwan3d/comment-system contains the following files

Loading the files please wait ....